Commit Graph

2966 Commits (6119e790231eb04a2ede8d0e133de8724aae8cb2)

Author SHA1 Message Date
Paulus Schoutsen ec57db78b5
Consolidate config flow components (#20635)
* Consolidate config flow components

* Fix tests

* Fix tests

* Put unifi back

* Fix reqs

* Update coveragerc
2019-02-01 15:45:44 -08:00
Till 495524ecc0 Update miflora.py to have relevant sensor icons (#20650)
* Update miflora.py to have relevant sensor icons

Adds relevant default icons for the sensors of the Mi Flora plant sensor component.

* Clean up code
2019-02-01 14:08:03 -08:00
Oliver Völker aec8ad2188 InfluxDB - change connection test method (#20666) 2019-02-01 18:35:49 +01:00
Rohan Kapoor 9e7d7354ed Fix sensor.cpuspeed inside docker container (#20614) (#20656) 2019-02-01 08:58:29 +01:00
Sander Zumbrink e20c2aa113 Add precision parameter to dsmr sensor (#19873)
* Added precision parameter to dsmr sensor

* Added precision parameter to dsmr sensor, added whitespace after comma

* Added precision parameter to dsmr sensor

* Added precision parameter to dsmr sensor, fixed test

* Changed try except as requested
2019-01-31 16:46:54 +01:00
Diogo Gomes c7ff8d4996 fix #20571 (#20589) 2019-01-30 17:33:52 -08:00
Gido 542160fc56 Add sensor platform for Rova Garbage Collection (#18868)
* Adding sensor for SolarEdge Monitoring API support

* Adding support for Rova garbage calendar

* Added Rova platform to retrieve garbage pickup times

* Update async to new syntax
Added async_update to sensor class
Added Throttle to Rova update function
Minor code style changes

* Small style fixes

* Removed domain

* Update debug to error messages
Change CONF_MONITORED_VARIABLES to CONF_MONITORED_CONDITIONS
Update async update call to normal update

* Update requirements to rova v0.0.2
Add address check to see if ROVA collects in the given area

* Rename entity names to English
Add json_key to Sensor entities

* Add device_class to the RovaSensor

* Fix pylint and flake8 messages

* Add check for None in case collection date is unknown

* Return device class constant
2019-01-30 21:58:41 +01:00
choss ed299a9137 Add support for FRITZ DECT 100 (temp sensor) (#20308) 2019-01-30 18:44:36 +01:00
kennedyshead 988bcf9399 Fixing the openssl issue (#20570) 2019-01-29 07:42:38 -08:00
MatteGary e95c50c742 New Transmission component (#19230)
* New Transmission component and interaction

First commit for New Transmission component and interaction

* Fix commit

* Fix commit

* Fix + Switch checkin

Fix according to failed build and request, first checkin for Turtle Mode Switch in Transmission, still have to figure it out why it's not working.

* Bugfixing

* Fix commit

Multiple fix

* Fix

* fix for missing config

* Update on requirements_all.txt

* Fix in requirements_all.txt

* Fix

* Fix for build

* fix

* Fix

* Fix (again)

* Fix

* Fix indentation

* Fix indentation

* Fix Throttle

* Update .coveragerc

* Fix import and coveragerc
2019-01-29 10:27:26 +01:00
Stealth Hacker 6ff4ea1126 Add Recollect Waste (#20121)
* Added Recollect Waste Curbside Collection sensor for tracking next collection date and for which types of waste.

* Added missing schema attributes.

* Adding requirements and coverage entries for Recollect Waste platform.

* Added exception handling, some other fixes and suggestions from code review.

* Fixed reference to incorrect exception type.

* Updated requirements_all.txt with new version of recollect-waste.

* Added true to add_entities. Created constant for default time interval. Used different pylint exclusion comment.

* Using HA's CONF_SCAN_INTERVAL now. Unique_id is now set in @property.

* Changed parameter of timedelta from seconds to days.

* Added test run of recollect client during setup_platform. Using built in SCAN_INTERVAL now.

* Return nothing in setup_platform if there is an exception.
2019-01-29 09:38:01 +01:00
Diogo Gomes b0ff51b0ef Add an Integration sensor (#19703)
* initial version

* Tested

* set state added

* lint

* lint

* remove artifacts

* Use Decimal instead of float

* simplify

* travis lint fix

* addres comments by @ottowinter

* remove job

* better sanity check

* lower error -> warning

* hound

* fix state validation

* refactor energy -> integration

* address @MartinHjelmare comments

* new style string format

* remove async_set_state

* patching the source function
2019-01-29 08:25:36 +01:00
Rohan Kapoor cc74035c3b Move CONF_UPDATE_INTERVAL to homeassistant.const (#20526) 2019-01-28 20:26:31 -08:00
Aaron Bach 2c7060896b Make Ambient PWS async and cloud-push (#20332)
* Moving existing sensor file

* Initial functionality in place

* Added test for config flow

* Updated coverage and CODEOWNERS

* Linting

* Linting

* Member comments

* Hound

* Moving socket disconnect on HASS stop

* Member comments

* Removed unnecessary dispatcher call

* Config entry fix

* Added support in config flow for good accounts with no devices

* Hound

* Updated comment

* Member comments

* Stale docstrings

* Stale docstring
2019-01-28 15:35:39 -08:00
Christian Biamont f33e432cab Reset Brottsplatskartan incident types every day (#20117)
* Reset the incident types count every day

* Remove functionality that was never implemented

We don't need to keep track of previous incidents because it's not used
anywhere.

* Create empty dictionary with a pair of braces: {}
2019-01-28 12:30:15 +01:00
Eliseo Martelli 3d4f2926e9 Add Iliad Italy (Mobile Telephony Provider) Sensor (#19645)
* working state

* Attrs

* > requirements generated

* linting

* fixes

* coveragerc

* ordered imports and fixed auth

* Added Throttle

* moved throttle to decorator

* remove scan interval

* lower throttle

* moved to scan interval

* Add attribution
2019-01-27 21:44:19 +01:00
Rohan Kapoor 7368c623d4 Split out dovado to a component and sensor platform (#20339)
* Split out dovado to a component and sensor platform

* Lint

* Address code review comments (#20339)

* Switch to using a notify platform for dovado SMS (#20339)

* Optimizing imports

* Remove return on `setup_platform`.

* Clean up unneeded constants
2019-01-27 10:36:10 +01:00
Aaron Bach 239c60c09f
Use HASS latitude/longitude as defaults for Lyft (#20491) 2019-01-26 23:21:51 -07:00
Fabian Affolter 38b1ce3fe0 Upgrade psutil to 5.5.0 (#20462) 2019-01-26 22:11:36 +01:00
Fabian Affolter 9920699bb8 Upgrade sqlalchemy to 1.2.16 (#20474) 2019-01-26 22:11:00 +01:00
Jef D f3285f96bb Add Co2signal sensor (#19204)
* Initial commit for the co2signal sensor

* Clean code

* Run script gen_requirements_all.py

* remove unintended character

* Remove redundancy

* Remove unused imports

* Code style

* Code style fixes

* Code style

* Fix comments PR

Comments by @fabaff
* Remove redundant comments and variables
* Follow the latest home-assistant guidelines

* Bump CO2Signal version

* Round API result

* Improve default latitude/longitude handling

* Improve friendly name

* Improve config handling

* Make lines shorter

* Style

* Convert default to variable

None does not pass cv.string

* Message if not inclusive

* Shorten line

* Update requirements

* Update co2signal.py

Group imports;  remove empty lines; refactor use of location_type; remove logging messages; remove unused functions; add global variables

* Update co2signal.py

Import platform schema from sensor

* Small fix

* Update co2signal.py

Remove last mentions of location_type

* Review changes

Add attribution
Formatting

* Missing whitespace

* Update co2signal.py

Fix pylint

* Update co2signal.py

Change blank lines

* Update co2signal.py

Initialise _data
2019-01-26 19:02:46 +01:00
Andrey Kupreychik d4c7515681 Add time_throttle filter to sensor.filter (#20334)
* Added time_throttle filter

* Added time_throttle filter test

* Updated comments for time_throttle filter
2019-01-25 10:07:45 +00:00
Fabian Affolter 046683ee3f Upgrade numpy to 1.16.0 (#20396) 2019-01-24 17:53:17 -08:00
Daniel Høyer Iversen 3b1534c126 Remove logging from tibber (#20382)
* Remove logging from tibber

* keep guard
2019-01-24 21:56:44 +01:00
Daniel Høyer Iversen 1bd31e3459 Change STATE_UNKOWN to None (#20337)
* Change STATE_UNKOWN to None

* Change STATE_UNKOWN to None

* tests

* tests

* tests

* tests

* tests

* style

* fix comments

* fix comments

* update fan test
2019-01-24 08:20:20 +01:00
Eliseo Martelli 971d933140 [FIX] Time reporting incorrect in sensor.gtt (#20362)
* quick fix

* remove print statement

* fixes

* remove lambda

* added pylint disable

* should be fine now
2019-01-23 17:05:16 -08:00
Daniel Høyer Iversen 5bf3b2dd9f
clean up of islamic_prayer_times (#20352)
update_sensors was not awaited in async_track_point_in_time()
2019-01-23 20:17:45 +01:00
Richard Mitchell 5b25188474 Should require the 'GATTOOL' setup extras which includes pexpect. (#20263)
* Should require the 'GATTOOL' setup extras which includes pexpect.

* Also fix skybeacon's requirement and requirements_all.
2019-01-22 18:50:21 +01:00
Mateusz Korniak 9b7780edf0 Ecoal (esterownik.pl) static fuel boiler and pump controller (#18480) - matkor
* Starting work on ecoal boiler controller iface.

* Sending some values/states to controller.

* Basic status parsing, and simple settings.

* Platform configuration.

* Temp sensors seems be working.

* Switch from separate h/m/s to datetime.

* Vocabulary updates.

* secondary_central_heating_pump -> central_heating_pump2

* Pumps as switches.

* Optional enabling pumps via config.

* requests==2.20.1 added to REQUIREMENTS.

* Optional enabling temp sensors from configuration yaml.

* autopep8, black, pylint.

* flake8.

* pydocstyle

* All style checkers again.

* requests==2.20.1 required by  homeassistant.components.sensor.ecoal_boiler.

* Verify / set switches in update().
Code cleanup.

* script/lint + travis issues.

* Cleanup, imperative mood.

* pylint, travis.

* Updated .coveragerc.

* Using configuration consts from homeassistant.const

* typo.

* Replace global ECOAL_CONTR with hass.data[DATA_ECOAL_BOILER].
Remove requests from REQUIREMENTS.

* Killed .update()/reread_update() in Entities __init__()s.
Removed debug/comments.

* Removed debug/comments.

* script/lint fixes.

* script/gen_requirements_all.py run.

* Travis fixes.

* Configuration now validated.

* Split controller code to separate package.

* Replace in module docs with link to https://home-assistant.io .

* Correct component module path in .coveragerc.
More vals from  const.py.
Use dict[key] for required config keys.
Check if credentials are correct during component setup.
Renamed add_devices to add_entities.

* Sensor/switch depends on ecoal_boiler component.
EcoalSwitch inherits from SwitchDevice.
Killed same as default should_poll().
Remove not neede schedule_update_ha_state() calls from turn_on/off.

* lint fixes.

* Move sensors/switches configuration to component setup.

* Lint fixes.

* Invalidating ecoal iface cache instead of force read in turn_on/off().

* Fail component setup before adding any platform entities.
Kill NOTE.

* Disallow setting entity names from config file, use code defined default names.

* Rework configuration file to use monitored_conditions like in rainmachine component.

* Killed pylint exception.
Log error when connection to controller fails.

* A few fixes.

* Linted.
2019-01-22 08:14:27 -05:00
Johann Kellerman 6511e11ec9 Config Validator: schema_with_slug_keys (#20298)
* schema_with_slug_keys

* Update config_validation.py

* Update config_validation.py
2019-01-21 16:36:04 -08:00
Daniel Høyer Iversen e4f42d1282
Update Tibber lib (#20289) 2019-01-21 16:12:03 +01:00
NotoriousBDG 5b8cb10ad7 Make Netatmo battery_percent icon dynamic (#20275) 2019-01-20 22:30:17 +01:00
Matthew Wegner 6bf42ad43d Added Search Configuration to IMAP Sensor (#19749)
* Added Search Configuration to IMAP Sensor

The IMAP sensor currently only counts unread emails in a folder.  By exposing the IMAP search parameter, the sensor can be used to count other results:

- All emails in an inbox
- Emails sent from an address
- Emails matching a subject
- Other advanced searches, especially with vendor-specific extensions.  Gmail in particular supports X-GM-RAW, which lets you use any Gmail search directly ("emails with X label older than 14 days with", etc)

For my use case, I just wanted total emails in a folder, to show an "X/Y" counter for total/unread.  I started work on a one-off script to throw the data in, but figured I'd try to extend Home Assistant more directly, especially since this IMAP sensor correctly handles servers that push data.  This is my first Home Assistant contribution, so apologies in advance if something is out of place!  It's a pretty minimal modification.

* Added Server Response Checking

Looks like no library exception is thrown, so check for response text before parsing out results (previous code just counts spaces, so an error actually returns a state value of 4).

* IMAP Warning -> Error, Count Initializes to None

IMAP search response parsing throws an error instead of a warning.

Email count initializes as None instead 0.

Email count is untouched in case of failure to parse response (i.e. if server is temporarily down or throwing errors, or maybe due to user updating their authentication/login/etc).

Fixed line length on error so it fits under 80 characters.

* Fixed Indent on Logger Error

Sorry about the churn!  Python is pretty far from my daily-use language.  (I did run this one through pep8, at least)
2019-01-19 21:37:02 +01:00
Daniel Høyer Iversen 0987219b28 Tibber Pulse for homes without subscriptions (#20246) 2019-01-19 10:23:22 -08:00
Louis Matthijssen e80702a45c Fix unused friendly name for SolarEdge sensor (#20109) 2019-01-18 15:02:27 +01:00
Rohan Kapoor 2de6a94506 Embed zoneminder platforms into component (#20182) 2019-01-17 11:13:15 +01:00
cvwillegen 5e73846bcc imap_email_content: allow configuring folder to read. (#20160)
* Update imap_email_content.py

Add configuration for selection of IMAP folder to track

* Update imap_email_content.py
2019-01-16 10:59:54 -08:00
Nikolay Vasilchuk 075b575bde Support device_class for rest sensor (#20132)
* Ready

* Tests fixed
2019-01-16 10:03:53 -08:00
cvwillegen c8efbb2cdc Fix link to documentation link, select read-only (#20155)
- Fixed link to documentation page at the top of the sensor
- Select the IMAP4 Inbox read-only so that reading e-mail does not mark messages as Read
2019-01-16 09:56:53 -08:00
Rohan Kapoor bc30491dc0 Add support for connecting to multiple zoneminder instances (#19955)
* Add support for connecting to multiple zoneminder instances

* Lint

* Lint

* Clean up and better error handling

* Fix config validation

* Lint
2019-01-16 10:15:13 +01:00
Tim Gerla fe93ea9bdf Use the correct Unicode degree symbol (#20058)
The previous symbol used for degrees was U+00BA, the "Masculine Ordinal Indicator". This patch changes the symbol to U+00B0, "Degree Sign", to match the rest of the Home Assistant system.
2019-01-16 09:08:23 +01:00
Robert Svensson a3f0d55737
Change deCONZ to embedded platforms (#20113)
Move all platforms into components/deconz
2019-01-15 19:29:56 +01:00
emontnemery 5b53bd6aa0
Move MQTT platforms under the component (#20050)
* Move MQTT platforms under the component
2019-01-15 17:31:06 +01:00
Eliseo Martelli 5fd1053a38 fixed gtt to report isotime (#20128) 2019-01-15 13:39:43 +01:00
Aaron Bach af2949f85f
Embed OpenUV platforms into the component (#20072)
* Embed OpenUV platforms into the component

* Updated CODEOWNERS

* Updated .coveragerc
2019-01-14 11:44:00 -07:00
Aaron Bach d717d9f6be
Embed RainMachine platforms into the component (#20066)
* Embed RainMachine platforms into the component

* Updated CODEOWNERS

* Updated .coveragerc
2019-01-14 11:42:21 -07:00
Otto Winter f225570980 Move ESPHome Source Files (#20092)
* Move ESPHome source files

* Update .coveragerc

* Update CODEOWNERS
2019-01-14 09:00:48 -07:00
Thom Troy cb9e0c03d5 fix logic error in dubln bus (#20075) 2019-01-14 10:51:37 +01:00
Paulus Schoutsen 96b8c517f0 Update translations 2019-01-13 09:38:22 -08:00
Sean Dague 218c82eaf3
mychevy: Fix wrong attribute on battery level selector (#20016)
The battery level sensor is broken because the logic for determining
if the battery is charged accessed the wrong variable. This one
character fix makes it work again.
2019-01-12 13:51:01 -05:00
David F. Mulcahey ba21608042 Repackage ZHA component (#19989)
* move files

* rename files

* rename files

* move files

* relative import

* update coveragerc
2019-01-11 20:34:48 -08:00
pbalogh77 7dac7b9e5e Support for multiple Fibaro gateways (#19705)
* Preparing for transition to config flow

Added multiple gateway support
Reworked parameter flow to platforms to enable multiple controllers
Breaking change to config, now a list of gateways is expected instead of a single config

* Updated coveragerc

Added new location of fibaro component

* Fixes based on code review and extended logging

Addressed issues raised by code review
Added extended debug logging to get better reports from users if the device type mapping is not perfect

* Changhes based on code review

Changes to how configuration is read and schemas
Fix to device type mapping logic

* simplified reading config

* oops

oops

* grr

grr

* change based on code review

* changes based on code review

changes based on code review
2019-01-11 15:29:54 -08:00
Bas 8c27bf8c7c Expose more information about shipments by PostNL (#18334)
* Expose more information about shipments by PostNL

* Update postnl.py
2019-01-11 14:59:31 -08:00
Antoine GRÉA 14dd8791ec Adding IPv6 to fail2ban sensor (#19457)
* Fixing fail2ban regex for ipv6

* Adding IPv6 tests for fail2ban

* Formating code for hound

* Formating again

* Formating again 2
2019-01-11 12:54:47 -08:00
Eliseo Martelli 71eaef8da4 add service type in name (#19980) 2019-01-11 09:51:41 -08:00
Paulus Schoutsen d812f23f6b
min_max sensor support for STATE_UNAVAILABLE (#19914) 2019-01-11 09:27:48 -08:00
Fabian Affolter 2228f2ef66 Upgrade pysnmp to 4.4.8 (#19961) 2019-01-11 10:47:53 -05:00
Tyler Page c3e9bd1444 Change state() to try/except to catch KeyError (#19935)
* Change state() to try/except to catch KeyError

When Tautulli is up but Plex is down, the API doesn't return a 'stream_count' key. This causes calls to state() to raise KeyError exceptions. The new code includes a try/except to catch the KeyError and return -1 signifying that the Tautulli API cannot talk to Plex

* Update tautulli.py
2019-01-11 08:48:36 +01:00
Fabian Affolter 4c1eeb9e96 Upgrade pylast to 3.0.0 (#19938) 2019-01-10 17:43:31 -08:00
Kevin Fronczak 2be0d1b096 Upgrade blinkpy and use calibrated temperature for sensor (#19723) 2019-01-10 17:24:35 -08:00
SNoof85 96d20a64d5 add_entities -> async_add_entities (#19943)
Better state handling at HA startup
2019-01-10 17:13:29 -08:00
arigilder 4d187e08d4 Add sensors to jewish_calendar for upcoming Shabbat times (#19278)
* Initial pass of cleanup for shabbat_times

* Switch to async defs

* First pass of unit tests + fixture data

* Completion of first round of unit tests, 100% passing

* Unit tests for state restoring

* Style fixes

* More style fixes

* Lint fix

* Add upcoming candelighting and havdalah sensors

* Add unit tests, remove havdalah offset

* More unit tests + small bugfix for weekly_portion

* Add issur melacha sensor

* Remove old shabbat_times work-in-progress files

* Bump required version of hdate

* Add havdalah offset config parameter

* Bump hdate version required

* Pin hdate requirement

* Lint fixes

* Changes based on review + API changes for hdate 0.8.7

* Add three-day holiday unit tests

* Remove debugging line

* Add missing docstring

* Fix doc lint comment
2019-01-10 16:27:34 -08:00
Richard Mitchell e753ffca94 Correctly map Nest hvac_state to Home Assistant states. (#19895) 2019-01-10 09:28:01 -08:00
Jérôme Wiedemann e6a2c18430 min_max sensor support for STATE_UNAVAILABLE 2019-01-10 13:48:24 +01:00
Aaron Bach 01eee52990
Bump pyflunearyou to 1.0.1 (#19899) 2019-01-09 19:38:19 -07:00
Paulus Schoutsen 9aed40a88d Update translations 2019-01-09 15:29:31 -08:00
Rendili 6d9fda04ac add entity support to hive (#19879) 2019-01-08 20:15:12 -08:00
Pierre c29bffc8d8 Replace influxdb query by another query that is more lightweight (#19880)
same as #6289
2019-01-08 23:31:39 +00:00
emontnemery f0f386e314
Cleanup if discovered mqtt sensor can't be added (#19745)
* Cleanup if discovered mqtt sensor can't be added

* No bare except

* Clear ALREADY_DISCOVERED list with helper
2019-01-08 16:46:26 +01:00
kennedyshead 377b129c9c Make asuswrt sensor optional (#19736) @kennedyshead
* Dont load if not in config

* Adding config options for sensors

* Fixed mistake with iterating over wrong things

* lint

* lint

* Setting None state

* Using .get when fetching optional config
2019-01-08 09:14:16 -05:00
Rene Nulsch 410f19c777 Replace MyChevy persistant_notification with error log entry (#19804)
The mychevy service is notoriously unreliable, often only having 50% uptime. 
Previously a persistent notification was emitted when the platform errored out. 
Users have found that is happening too often, so instead log an error when
this happens instead.
2019-01-08 08:06:08 -05:00
kennedyshead c7a32e59b7 Fix state and attribute fetching in vasttrafik (#19856)
* Fixing state and attribute fetching

* Fixing state and attribute fetching

* Setting None state

* Need to brreak loop
2019-01-08 09:54:22 +01:00
Fabian Affolter 4905f4dd97
Upgrade beautifulsoup4 to 4.7.1 2019-01-07 19:16:04 +01:00
emontnemery 08ac6da8a6 Clear ALREADY_DISCOVERED list with helper 2019-01-07 17:03:10 +01:00
emontnemery 8701be095b No bare except 2019-01-07 17:03:10 +01:00
emontnemery 0b57cfb004 Cleanup if discovered mqtt sensor can't be added 2019-01-07 17:03:10 +01:00
kennedyshead c96778c82a This makes the vasttrafik platform stop spamming the logs with warnings (#19792)
* This makes the vasttrafik platform stop spamming the logs with warrnings

* Forcing build
2019-01-06 21:06:20 +01:00
Rene Nulsch 1e18a2c679 Remove temperature from the list of available forecast sensors (#19818) 2019-01-06 20:52:55 +01:00
Johann Kellerman 3ffa0176cc
SMA sensor - updated library (#19753) 2019-01-06 19:20:19 +02:00
Maciej Bieniek 27a9f5a05c Round illumination and lux value to one (#19747) 2019-01-04 18:25:37 +01:00
ctborg 6b18b92bdd Drop bme680 os_lookup for temp_offset (#19733)
Drops os_lookup, as it isn't needed to set the temperature offset.
2019-01-03 11:35:13 -07:00
Andrew Hayworth 87a0118082 Do not choke on no awair data (#19708)
* awair: do not choke on no data

The awair API returns an empty response for various air data queries
when a device is offline. The underlying library (python_awair) does
not directly inform us that a device is offline, since we really can
only infer it from an empty response - there is no online/offline
indicator in the graphql API.

So - we should just ensure that we do not attempt to update device state
from an empty response. This ensures that the platform does not crash
when starting up with offline devices, and also ensures that the
platform is marked unavailable once devices go offline.

* Fix typo

Further proof that coding after 10pm is rolling the dice.
2019-01-03 14:41:18 +01:00
ctborg 688bdc6532 Adds ability to calibrate temperature for BME680 (#19684)
* Adds temperature calibration

* Add deps.  Lint fix
2019-01-02 13:02:29 -05:00
Daniel Perna 4244ea78d0 Update pyhomematic 0.1.54 + small fixes (#19667)
* Update pyhomematic + small fix

* Add casting for ILLUMINATION

* Revert suggested fix
2019-01-01 16:25:57 +01:00
Fabian Affolter 7c302bfd7e
Luftdaten traceback (#19666)
* Suppress traceback if there is not connection available

* Remove line break
2019-01-01 14:21:02 +01:00
Robin ff80fc347b Fix london_underground issue (#19642)
* Update london_underground.py

* Update test

* Update london_underground.py

* Update london_underground.py

* Update london_underground.py

* Fix lint

* Use london-tube-status==0.2
2018-12-31 06:24:52 -08:00
Thom Troy 81a0ce621e Fix exception checking for next dublin bus (#19663) 2018-12-30 18:35:12 +01:00
Ville Skyttä f925d9ca6b Use xml.etree through defusedxml (#19640) 2018-12-30 00:07:48 +01:00
Marius Retegan 32eb4e518b Fix cpu_temp issue on Vero 4K (#19638) 2018-12-29 21:01:47 +01:00
Andrei 82d6fe5bd5 Fix cpu_temp issue on Odroid (#19620) 2018-12-28 21:36:00 +01:00
Rene Nulsch 14c39f7c24 Systemmonitor - add device_class property (#19614) 2018-12-28 10:28:40 +01:00
SNoof85 699a38de52 Add Freebox component with sensors and device tracker (#18472)
* Add freebox component with sensor and device tracker

* script/gen_requirements_all passed and pylint fixes

* Fix docstring in wrong place

* Fix indentation

* Lint fixes

* More lint fixes

* Lint fixes again

* Pylint fixes

* Bump aiopyfreebox version

* Close freebox connection on HA Stop

* Fixed docstring

* Fixed ident

* Lint fixes

* Fix cloing session when HA stop

* Fix URL

* Fix URL

* Fix double look up in discovery datas

* Fix logging level

* Fix get_device_name

Thx for the hint Martin

* Fix async_update_info

* Update requirements_all.txt
2018-12-27 15:26:09 -08:00
Max Rydahl Andersen b32e6fe0d5 Add AfterShip sensor for packages (#18034)
* Add AfterShip sensor for packages

Why:

 * I receive a lot of packages from many different shipping companies.
 * I would like to see in haas how many packages are being delivered.

This change addreses the need by:

 * Adding a sensor for AfterShip (aftership.com)
 * AfterShip supports ~490 couriers world wide thus should cover
   almost any sensible tracking.

Notes:
  - For now this sensor assumes you somehow have added trackings to
    aftership manually.
  - Future idea is to expose service that allows adding a tracking
    based on incoming mails.
  - Other improvments would be to add map markers for package locations.

Related:
- https://community.home-assistant.io/t/package-tracking/858
- https://community.home-assistant.io/t/aftership-package-tracking/24068
- https://community.home-assistant.io/t/aftership-shipment-tracking-platform/14074
- https://community.home-assistant.io/t/aftership-state-card/57912

* Fix typo and update ordering
2018-12-27 10:01:57 -08:00
Fabian Affolter 2efa297df1 Upgrade pyowm to 2.10.0 (#19582) 2018-12-26 14:46:59 -05:00
DoloresHA 796b195c73 Update pylaunches dependency to 0.2.0 (#19570)
* Update pylaunches dependency to 0.2.0

Update launch library to use pylaunches 0.2.0 as a dependency. launch_time sensor attribute will now be passed in ISO format, allowing for templating/easier automating with this attribute.

* Update pylaunches to 0.2.0
2018-12-25 23:47:19 +01:00
Heine Furubotten 47f8d248f7 Whitelisting of lines on entur sensor (#19539) 2018-12-25 23:43:46 +01:00
Mattias Welponer b80bed64f5 Add HomematicIP SMI55 device (#19400) 2018-12-25 10:40:21 +01:00
Alexei Chetroi 4a1da0b041 Configure ZHA entity on new ZHA device join (#19470)
* Address PR#19177 comments.

* Make 'new_join' part of ZhaEntity.

Call async_configure() automatically when new device ZHA device joins.
2018-12-23 20:47:06 +01:00
Fredrik Erlandsson 0b84eefa2e Add hub- and device-info for tellduslive (#19180)
* add hub- and device-info

* attempt to make I/O outside event loop

* add_executer_job

* coroutines

* async_get_hubs

Co-Authored-By: fredrike <fredrik.e@gmail.com>

* asyncio fixes

* do device_info IO when device is discovered

* it's called async_add_executor_job

* nicer unique_id

* add comment

* it's called `async_add_executor_job`

* hub always contains 'name'

* await each new device

* add comment to why gather is bad
2018-12-23 13:13:49 -05:00
Alexei Chetroi 01fc322488 Make ZHA entities non-polled by default (#19536) 2018-12-23 11:11:24 +01:00
William Comartin 2765440aa5 Implement path in the config to fix issues for some users (#19491)
* Update Tautulli sensor dependency pytautulli

Implement path in the config to fix issues for some users

* Add requirement
2018-12-22 14:36:06 -05:00
Antoine GRÉA 1099018a5e Fix fail2ban by removal of internal timer logic (#19456)
* Remove timer logic from sensor class

Proposed fix for issue #10500

* Updating the tests to remove timer logic

* Removing unecessary dependancy

* Fixing requested changes

* Commit to try to fix the CLA ?
2018-12-22 18:25:02 +01:00
Fabian Affolter 6880be5aeb Add sunrise and sunset to Darksky weather sensor (#19492)
* Add sunrise and sunset to Darksky weather sensor

* Fix lint issue
2018-12-22 08:52:36 -05:00
Joakim Sørensen 7c5ac88aae Add deprecation warning (#19515)
* Update ruter.py

* formating
2018-12-22 14:01:31 +01:00
David F. Mulcahey b444dfe8a6 Add ZHA battery sensor (#19363)
* add batery sensor

* add additional battery sizes

* remove blank line

* lint

* fix attribute report configuration

* return None - review comments
2018-12-22 09:11:33 +01:00
uchagani 3a3d488de3 Allow scrape sensor to retry setting up platform if initial setup fails (#19498) 2018-12-22 08:40:30 +01:00
Steven Looman 501b3f9927 Disable creating port mappings from UI, add discovery from component (#18565)
* Disable creating port mappings from UI, add discovery from component

* Remove unused constant

* Upgrade to async_upnp_client==0.13.6 and use manufacturer from device

* Upgrade to async_upnp_client==0.13.7
2018-12-21 17:25:23 +00:00
Diogo Gomes c789f11ef8
Fixed the range filter unknown argument precision (#19428)
In HomeAssistant 0.84.3, the range filter would not work due to the unexpected precision filter parameter. 
The default range scheme has been edited to remove the unexpected precision parameter.

Verified and tested.
2018-12-20 22:30:06 +00:00
uchagani 71900ca719 Add new sensor platform to expose Islamic prayer times (#19444)
* added new sensor platform to expose Islamic prayer times

* added new sensor platform to expose Islamic prayer times

* updated tests according to feedback

* make prayer_times_info a public attribute

* remove stale comments
2018-12-20 22:52:43 +01:00
Jens fa0185a481 Adds battery_percent which had been introduced with pyatmo 1.4 and resolves unknown var warning. (#19309) 2018-12-19 23:42:16 +01:00
Alexei Chetroi 4692605974 ZHA entity ZCL reporting configuration (#19177)
* Implement async_configure() method for ZHA entities.

Allow attribute reporting configuration to be stored as dict of zha
entity.

* Update ZHA platform to use new attribute reporting configuration.

* Use const declaration instead of magic numbers.

* Add support for manufacturer_id in ZCL attribute reporting configuration.

* Refactor async_configure() method.

Rename attribute reporting dict to zcl_reporting_config.
2018-12-19 14:52:20 +01:00
emontnemery 1568de62df Correct calls to subscription.async_unsubscribe_topics (#19414)
* Correct calls to subscription.async_unsubscribe_topics

* Review comments

* Add testcases
2018-12-19 14:05:24 +01:00
Gido 258fe1f09b Add sensor platform for SolarEdge Monitoring API (#18846)
* Adding sensor for SolarEdge Monitoring API support

* Adding support for Rova garbage calendar

* Update solaredge to pass lint and flake8

* Added solaredge.py to .coveragerc

* Added extend for Voluptuous schema

* Fixed styling issues

* Removed rova.py for later feature

* Replaced API requests with python pip package

* Fixed styling issues

* Updated to new async syntax
Added async_update to sensor class
Added Throttle to SolarEdge data update
Added CONF_NAME to platform settings
Added credentials check for api
Minor code style changes

* Remove unnecessary debug logging

* Updated dict keys

* Added SCAN_INTERVAL
Updated platform setup

* Remove DOMAIN variable
Correct import for PLATFORM_SCHEMA

* Change some debug to error messages
Correct return statements
Remove initial update call

* Fix pylint and flake8 errors
2018-12-19 09:56:45 +01:00
Fredrik Erlandsson e5487722a8 Add device_info to Daikin (#19372)
* add device_info to Daikin

* Use the constant CONNECTION_NETWORK_MAC from the device registry helper.
2018-12-19 08:18:40 +01:00
Fabian Affolter 686a856a17
Upgrade sqlalchemy to 1.2.15 (#19383) 2018-12-18 15:48:06 +01:00
Eliseo Martelli 51e6371991 Add Prezzibenzina (Italian Fuel Price) Sensor (#19297)
* complete(?)

* fixed linting

* update requirements

* added to coveragerc

* fixed linting

* added ability to set custom name

* fixed linting

* added filter

* spacing

* Added list of possible fuels

* Minor updates
2018-12-18 15:47:38 +01:00
Fabian Affolter 96c233d4b9
Use string foratting (#19427) 2018-12-18 15:23:53 +01:00
timkoers 17fbeb6245
Fixed the range filter unknown argument precision
In HomeAssistant 0.84.3, the range filter would not work due to the unexpected precision filter parameter. 
The default range scheme has been edited to remove the unexpected precision parameter.

Verified and tested.
2018-12-18 13:21:08 +01:00
Marius Retegan da10598fa1 Fix cpu_temp issue on Raspberry Pi (#19404) 2018-12-17 18:30:17 -05:00
Eliseo Martelli 6e26713184 Add GTT Sensor (#18449)
* added gtt sensor

* removed trailing space

* updated requirements_all

* fixed two errors in the code style

* fixed imperative in docstring

* disabled pylint false positive

* fixed description on top of the file

* added files to .coveragerc

* fixes

* linting

* fixed linting 👍

* left a trailing space, now it's gone.

* fix
2018-12-17 18:03:34 -05:00
Sean Dague e9c19462d6 Provide charging indicator for mychevy (#19348)
* Provide charging indicator for mychevy

This expands the mychevy sensor for the battery level to also know if
the system is currently charging to get the correct icon.

* address review feedback
2018-12-17 17:56:49 -05:00
Otto Winter 8861909ea4
Add native ESPHome API text sensor (#19377)
* Update

* 🚑 Lint
2018-12-17 20:51:59 +01:00
Fredrik Erlandsson 40d8bd43a1 fix unique_id for Tellduslive sensors (#19389) 2018-12-17 20:33:01 +01:00
Aaron Bach cc90cba78a
Add support for statewide data for Flu Near You (#19341)
* Initial changes

* Add support for state-wide data for Flu Near You

* Bumped requirements

* Member comments
2018-12-16 18:51:56 -07:00
Otto Winter a08bab7b18 Add native ESPHome API component (#19334)
* Create esphomelib component

* Update requirements

* Remove python 2 string literals

* MVP

* Remove config flow

* Remove config flow translations

* Use dispatcher more

* Use data classes

* Type Hints

* Cleanup on remove

* Use helper and cleanup

* Fix HA stop listener cleanup

* Add config flow

* Fix SyntaxError for Py3.5

* Update

* Lint

* Re-do tests

*  Rename to ESPHome

* Better error message for resolve errors

* Fix tests when aioesphomeapi not installed

* Refactor mock

* Update requirements

* Add strings.json

* 🍵 100% config flow  test coverage
2018-12-17 01:29:32 +01:00
Fredrik Erlandsson 5a295ad42b Add config flow for Daikin (#19182)
* config flow for daikin

* tox test

* return fixes

* tox test fixes

* tox formatting
2018-12-16 16:19:18 +01:00
emontnemery 07e3843918
Fix broken sensor.mqtt json_attributes deprecation message (#19349) 2018-12-16 15:44:25 +01:00
Christian Biamont c26c8affc7 Add Brottsplatskartan sensor (#19018)
* Added brottsplatskartan sensor

* Update brottsplatskartan sensor

* Remove redundant configuration checks.
* Set attributes during initialization.
* Setup brottsplatskartan module in setup_platform().
* Just do a simple return, no need for returning false.

* Remove file that was used during testing

* Better variable name and remove excessive newline.

* More updates to brottsplatskartan

* Import uuid at the top of the module.
* Use sensor as domain.
* Don't fire custom events.
* Remove period from logging message.

* Adding validation for area parameter

* Validate empty area configuration

* Fixing indentation.

* Fixing the config schema
2018-12-16 12:21:07 +01:00
Malte Franken 629dd24ff3 bump georss_client to 0.5 (#19337) 2018-12-16 11:14:36 +01:00
emontnemery 3a7083900c
Merge pull request #19223 from emontnemery/mqtt_sensor_json_attributes_topic
Add JSON attribute topic to MQTT sensor
2018-12-15 16:28:34 +01:00
tmd224 d60b7d46b7 Add Ambient Weather PWS Sensor component (#18551)
* Adding ambient_station.py sensor and updating requirements file

* Cleaning up code and fixing flake8 warnings

* Fixing flake8 and pylint warnings

* Adding ambient_station.py sensor and updating requirements file

* Cleaning up code and fixing flake8 warnings

* Fixing flake8 and pylint warnings

* Fixing bug, things are working well now

* removing nosetests file

* Adding changes as requested in pull request #18551

* Updating with more change requests from PR code review

* Removing SCAN_INTERVAL from PLATFORM_SCHEMA

* Removing unused import

* Adding platform schema validation for monitored_conditions and conf_units

* Updating link to documentation in doc-string.  File already named in doc repo

* Only setup platform if component can successfully communicate with API

* Inverting check for platform setup success
2018-12-14 23:53:49 +01:00
Ville Skyttä 1c147b5c5f huawei_lte: Fetch only required data (#17618)
When debug logging is enabled, still fetch everything in order to
provide indication of available/supported data to users, as instructed
in docs.
2018-12-14 14:51:13 +01:00
Erik Eriksson 004179775c Updated ELIQ Online sensor to async API (#19248)
* Updated ELIQ Online sensor to async API

* Remove use of STATE_UNKNOWN
2018-12-14 13:25:28 +01:00
Thibault Maekelbergh 4a23d4c7d3 Add NMBS (Belgian railway) sensor platform (#18610)
* Add custom component to core

* Add pyrail to reqs

* Format & lint

* Sort nmbs.py into place on coveragerc

* Only set up station live if provided

* Only set up sensor if config is provided

* Fix line too long linting error

* PR Remarks

* Add docstrings

* Fix hound line to long error

* Fix quotes

* Rebase coveragerc

* PR Review

* Init empty attrs

* Dont include delay if there is none

* PR review

* Safer check

* Rebase reqs

* Generate req

* Update homeassistant/components/sensor/nmbs.py

Co-Authored-By: thibmaek <thibault.maekelbergh@iCloud.com>

* PR remarks
2018-12-14 09:52:34 +01:00
Heine Furubotten ddbfdf14e9 Upgraded enturclient to 0.1.2 (#19267) 2018-12-14 08:33:46 +01:00
Rohan Kapoor e8ec74b944 Expose ZoneMinder availability to Home Assistant (#18946)
* Expose ZoneMinder availability to Home Assistant

* Bump zm-py to 0.2.0 with the availability changes published
2018-12-14 08:10:54 +01:00
Fredrik Erlandsson 9f790325bb Fix point sensor discovery (#19245) 2018-12-13 16:40:56 +01:00
Aaron Bach f8438e96d1 Add package data attribute to 17track.net summary sensors (#19213)
* 17track.net: Add package data attribute to summary sensors

* Member comments
2018-12-12 19:07:06 +01:00
Erik 0e868deedd Add JSON attribute topic to MQTT sensor 2018-12-12 16:26:44 +01:00
Lukas Barth 4984030871 Fix geizhals crash if no price found (#19197)
* Fix geizhals crash if no price found

* Return None on unknown price.

* Linting

* Linting the linting
2018-12-12 16:11:18 +01:00
Fredrik Erlandsson 92e19f6001 TelldusLive config flow (#18758)
* update TelldusLive to use config flow

* fixes from Martin

* Update homeassistant/components/tellduslive/config_flow.py

Co-Authored-By: fredrike <fredrik.e@gmail.com>

* revert changes in entry.py

* tox tests

* tox fixes

* woof woof (fix for hound)

* lint ignore

* unload entry

* coverall toxtests

* fix some toxtests
2018-12-10 18:44:45 +01:00
Yaron de Leeuw a744dc270b Update pygtfs to upstream's 0.1.5 (#19151)
This works by adding `?check_same_thread=False` to the sqlite
connection string, as suggested by robbiet480@.
It upgrades pygtfs from homeassitant's forked 0.1.3 version to 0.1.5.

Fixes #15725
2018-12-09 23:32:48 +01:00
Lukas Barth 5e65e27bda Update geizhals dependency (#19152) 2018-12-09 23:22:33 +01:00
speedmann 7edd241059 Automatically detect if ipv4/ipv6 is used for cert_expiry (#18916)
* Automatically detect if ipv4/ipv6 is used for cert_expiry

Fixes #18818
Python sockets use ipv4 per default. If the domain which should be checked
only has an ipv6 record, socket creation errors out with
`[Errno -2] Name or service not known`
This fix tries to guess the protocol family and creates the socket
with the correct family type

* Fix line length violation
2018-12-07 11:08:41 +01:00
Ville Skyttä 1be440a72b Upgrade pylint to 2.2.2 (#18750)
* Upgrade to 2.2.0

* simplifiable-if-expression fixes

* duplicate-string-formatting-argument fixes

* unused-import fixes

* Upgrade to 2.2.1

* Remove no longer needed disable

* Upgrade to 2.2.2
2018-12-06 11:54:44 +01:00
Daniel Høyer Iversen d4c8024522 Add support for more Tibber Pulse data (#19033) 2018-12-06 09:30:11 +01:00
Teemu R da0542e961 Bump python-miio to 0.4.4 (#19042) 2018-12-05 18:19:30 +01:00
Alexei Chetroi 3e1ab1b23a Sort import order of zha component. (#18993) 2018-12-04 11:38:57 +01:00
Fredrik Erlandsson d6a4e106a9 Tellduslive refactoring (#18780)
* move component to a package

* move TelldusLiveEntry to separate file

* refactor

* move entities from a shared container
* using the dispatch helper instead for communication between component and platforms

* updated covereagerc and codeowners

* suggestions from MartinHjelmare

* don't make update async

* "Strip is good!"
2018-12-04 10:08:40 +01:00
Daniel Høyer Iversen 31078b2b3e
Merge pull request #18928 from home-assistant/tibber_err_handle
Tibber, Improve logging and error handling
2018-12-04 06:47:50 +01:00
Kevin Fronczak 4486de743d Support for mulitple Blink sync modules (#18663) 2018-12-03 20:45:12 +00:00
Daniel Høyer Iversen df3c683023 Improve err handling 2018-12-03 20:53:18 +01:00
Fredrik Erlandsson 111a3254fb Point fix for multiple devices (#18959)
* fix for multiple devices closes, #18956

* Point API finally supports "all" events
2018-12-03 16:50:05 +01:00
Daniel Høyer Iversen fb12294bb7 remove unused import 2018-12-02 15:54:52 +01:00
Daniel Høyer Iversen 08dbd792cd Improve logging and error handling 2018-12-02 15:35:59 +01:00
Paulus Schoutsen a62fc7ca04
Use string formatting (#18886)
* Use string formatting

* Fix lint issue

* Fix change
2018-12-02 10:53:09 +01:00
Daniel Høyer Iversen d8c6cb1112
Merge pull request #18852 from emontnemery/mqtt_sensor_refactor
Small refactoring of MQTT sensor
2018-12-02 08:40:57 +01:00
Daniel Høyer Iversen ba372c085c
Merge pull request #18880 from ludeeus/tautulli-fix
Fixes error with getting attributes from Tautulli
2018-12-02 08:35:30 +01:00
Fabian Affolter 7b6893c9d3
Fix change 2018-12-01 22:08:15 +01:00
ludeeus 1dac84e9dd corrects , -> . typo 2018-12-01 21:34:31 +01:00
ludeeus da715c2a03 Use dict.get('key') instead of dict['key'] 2018-12-01 21:32:31 +01:00
Fabian Affolter fc1a4543d3
Fix lint issue 2018-12-01 20:57:39 +01:00
Fabian Affolter 54904fb6c0
Use string formatting 2018-12-01 19:27:21 +01:00
Michael Nosthoff bd09e96681 Reintroduce unique_id for Netatmo sensor (#18774)
* netatmo: make module type identification more consistent

For the interpretation of voltage values the different types of netatmo
modules need to be distinguished. This is currently done by selecting
the second character of the modules '_id'. The _id-field actually
contains a mac address. This is an undocumented way of identifying the
module_type.

The netatmo API also delivers a field called 'type' which provides a
more consistent way to differentiate the fields. This commit introduces
a differentiation which uses this provided type. This should improve
readability.

Also the field module_id is renamed to module_type which should better
resemble what it actually represents.

* netatmo: reintroduce unique_id using actual module mac address

Each netatmo module features a unique MAC-Address. The base station uses
an actual assigned MAC Address it also uses on the Wifi it connects to.
All other modules have unique MAC Addresses which are only assigned and
used by Netatmo on the internal Wireless-Network. All theses Addresses
are exposed via the API. So we could use the combination
MAC-Address-Sensor_type as unique_id.

In a previous commit this had already been tried but there was a
misunderstanding in what the 'module_id' represented. It was actually
only a module_type representation so it clashed when two modules of the
same type where used.

* Netatmo: fixed line length
2018-12-01 18:00:49 +01:00
ludeeus d8b9bee7fb Fix IndexError for home stats 2018-12-01 14:51:32 +01:00
Eliseo Martelli c69fe43e75 fixed state case for rtorrent (#18778) 2018-12-01 12:00:35 +01:00
Aaron Bach 3a854f4c05
Fix issues with 17track.net sensor names (#18860) 2018-11-30 21:54:40 -07:00
Aaron Bach c24ddfb1be
Bump py17track to 2.1.1 (#18861) 2018-11-30 21:12:55 -07:00
Erik Eriksson d7809c5398 Update of volvooncall component (#18702) 2018-11-30 19:07:42 +01:00
Erik 1686f73749 Small refactoring of MQTT sensor 2018-11-30 16:53:56 +01:00
Heine Furubotten 4bee3f760f Add Entur departure information sensor (#17286)
* Added Entur departure information sensor.

* Fixed houndci-bot comments.

* Removed tailing whitespace.

* Fixed some comments from tox lint.

* Improved docstring, i think.

* Fix for C1801

* Unit test for entur platform setup

* Rewritten entur component to have pypi dependecy.

* Propper client id for api usage.

* Minor cleanup of usage of constants.

* Made location output configurable.

* Cleaned up usage of constants.

* Moved logic to be contained within setup or update methods.

* Moved icon consts to root in module.

* Using config directly in test

* Minor changes
2018-11-30 09:06:59 +01:00
Andrew Hayworth 5f53627c0a Bump python_awair to 0.0.3 (#18819) 2018-11-30 08:47:05 +01:00
Aaron Bach 6f7ff9a18a
Remove additional self from update function in RainMachine (#18810) 2018-11-29 14:47:41 -07:00
Aaron Bach ab4d0a7fc3 Bumped py17track to 2.1.0 (#18804) 2018-11-29 22:24:32 +01:00
Eliseo Martelli 5c026b1fa2 Added qbittorrent sensor platform (#18618)
* added qbittorrent sensor platform

* Added requirements

* linting

* disabled broad-except

* added noqa

* removed pass statement (left that from development session)

* Added to coveragerc & moved to async

* fixed linting

* fixed indentation

* removed white space

* added await

* Removed generic exception

* removed pylint disable

* added auth checks

* linting

* fixed linting

* fixed error

* should be fixed now

* linting

* ordered imports

* added requested changes

* Update homeassistant/components/sensor/qbittorrent.py

Co-Authored-By: eliseomartelli <martely98@gmail.com>

* Update qbittorrent.py

* Minor changes
2018-11-29 20:40:26 +01:00
Daniel Høyer Iversen 8c9a39845c Round average price for Tibber (#18784) 2018-11-29 16:39:39 +01:00
mdallaire 07a7ee0ac7 Add more waterfurnace sensors (#18451)
Add the following sensors that provide interesting data when using a variable speed geothermal system:

* Compressor Power
* Fan Power
* Aux Power
* Loop Pump Power
* Compressor Speed
* Fan Speed
2018-11-29 06:04:12 -05:00
ehendrix23 aadf72d445 Fix statistics for binary sensor (#18764)
* Fix statistics for binary sensor

-) Binary sensors have 'on' and 'off' for state resulting in issue as numbers were expected. Fixed so that it works with non-numeric states as well.
-) Added check to skip unknown states.
-) Updates test so that binary sensor test will use non-numeric values for states.

* Using guard clause and changed debug to error

Changed to use a guard clause for state unknown.
Writing error on value error instead of debug.

* Add docstring
2018-11-29 09:01:56 +01:00
Fabian Affolter 623cec206b Upgrade Adafruit-DHT to 1.4.0 (fixes #15847) (#18614) 2018-11-28 13:38:26 +01:00
Adam Mills 5c3a4e3d10 Restore states through a JSON store instead of recorder (#17270)
* Restore states through a JSON store

* Accept entity_id directly in restore state helper

* Keep states stored between runs for a limited time

* Remove warning
2018-11-28 13:16:43 +01:00
damarco 052d305243 Add config entry for ZHA (#18352)
* Add support for zha config entries

* Add support for zha config entries

* Fix node_config retrieval

* Dynamically load discovered entities

* Restore device config support

* Refactor loading of entities

* Remove device registry support

* Send discovery_info directly

* Clean up discovery_info in hass.data

* Update tests

* Clean up rebase

* Simplify config flow

* Address comments

* Fix config path and zigpy check timeout

* Remove device entities when unloading config entry
2018-11-27 21:21:25 +01:00
Fredrik Erlandsson 5d5c78b374 Add unique_id for Daikin entities (#18747) 2018-11-27 15:36:55 +01:00
Fredrik Erlandsson eb2e2a116e Add unique_id for tellduslive (#18744) 2018-11-27 15:35:51 +01:00
kennedyshead 87507c4b6f fix aioasuswrt sometimes return empty lists (#18742)
* aioasuswrt sometimes return empty lists

* Bumping aioasuswrt to 1.1.12
2018-11-27 08:20:25 -05:00
Luis Martinez de Bartolome Izquierdo 9d1b94c24a Supports the new Netatmo Home Coach (#18308)
* Supports the new Netatmo Home Coach

* unused import

* Missing docstring

* Fixed pylint

* pydocs

* doc style
2018-11-27 14:01:34 +01:00
emontnemery a03cb12c61 Reconfigure MQTT sensor component if discovery info is changed (#18178)
* Reconfigure MQTT sensor component if discovery info is changed

* Do not pass hass to MqttSensor constructor

* Remove duplicated line
2018-11-27 11:23:47 +01:00
Franck Nijhof 2cbe083460 ⬆️ Upgrades InfluxDB dependency to 5.2.0 (#18668) 2018-11-25 20:52:09 +01:00
Fabian Affolter f387cdec59 Upgrade pysnmp to 4.4.6 (#18695) 2018-11-25 17:59:14 +01:00
Joakim Sørensen 23f5d785c4 Set correct default offset (#18678) 2018-11-25 12:30:38 +01:00
Andrew Hayworth eb6b6ed87d Add Awair sensor platform (#18570)
* Awair Sensor Platform

This commit adds a sensor platform for Awair devices, by accessing
their beta API. Awair heavily rate-limits this API, so we throttle
updates based on the number of devices found. We also allow for the
user to bypass API device listing entirely, because the device list
endpoint is limited to only 6 calls per day. A crashing or restarting
server would quickly hit that limit.

This sensor platform uses the python_awair library (also written
as part of this PR), which is available for async usage.

* Disable pylint warning for broad try/catch

It's true that this is generally not a great idea, but we really don't
want to crash here. If we can't set up the platform, logging it and
continuing is the right answer.

* Add space to satisfy the linter

* Awair platform PR feedback

- Bump python_awair to 0.0.2, which has support for more granular exceptions
- Ensure we have python_awair available in test
- Raise PlatformNotReady if we can't set up Awair
- Make the 'Awair score' its own sensor, rather than exposing it other ways
- Set the platform up as polling, and set a sensible default
- Pass in throttling parameters to the underlying data class, rather
than use hacky global variable access to dynamically set the interval
- Switch to dict access for required variables
- Use pytest coroutines, set up components via async_setup_component,
  and test/modify/assert in generally better ways
- Commit test data as fixtures

* Awair PR feedback, volume 2

- Don't force updates in test, instead modify time itself and let
  homeassistant update things "normally".
- Remove unneeded polling attribute
- Rename timestamp attribute to 'last_api_update', to better reflect
  that it is the timestamp of the last time the Awair API servers
  received data from this device.
- Use that attribute to flag the component as unavailable when data
  is stale. My own Awair device periodically goes offline and it really
  hardly indicates that at all.
- Dynamically set fixture timestamps to the test run utcnow() value,
  so that we don't have to worry about ancient timestamps in tests
  blowing up down the line.
- Don't assert on entities directly, for the most part. Find desired
  attributes in ... the attributes dict.

* Patch an instance of utcnow I overlooked

* Switch to using a context manager for timestream modification

Honestly, it's just a lot easier to keep track of patches. Moreover,
the ones I seem to have missed are now caught, and tests seem to
consistently pass.

Also, switch test_throttle_async_update to manipulating time more
explicitly.

* Missing blank line, thank you hound

* Fix pydocstyle error

I very much need to set up a script to do this quickly w/o tox, because
running flake8 is not enough!

* PR feedback

* PR feedback
2018-11-25 09:01:19 +01:00
Eliseo Martelli 1c17b885db Added deviceclass timestamp constant (#18652)
* Added deviceclass timestamp

* added device class timestamp to sensor

* fixed comment
2018-11-23 14:51:26 +01:00
Paulus Schoutsen c0cf29aba9
Remove since last boot from systemmonitor sensor (#18644)
* Remove since last boot

* Make systemmonitor last_boot be a timestamp
2018-11-23 11:55:45 +01:00
David F. Mulcahey 67aa76d295 Refactor ZHA (#18629)
* refactor ZHA

* lint

* review request

* Exclude more zha modules from coverage
2018-11-22 19:00:46 +01:00
mopolus 01ee03a9a1 Add support for multiple IHC controllers (#18058)
* Added support for secondary IHC controller

Most IHC systems only have one controller but the system can be setup with a linked secondary controller.
I have updated the code to have it support both primary and secondary controller. Existing configuration is not impacted and secondary controller can be setup the same way, with similar settings nested under 'secondary' in the configuration

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update __init__.py

* Update const.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update const.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update __init__.py

* Update ihc.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

indentation was incorrect for "load_platform" in "get_manual_configuration". Load_platform was not called with the correct component name
2018-11-22 09:45:40 +01:00
Nick Whyte 22ab83acae Cleanup BOM dependencies + add basic test + IDEA autoformat (#18462)
* Cleanup BOM dependencies + add basic test
2018-11-21 20:41:53 -05:00
Joakim Sørensen 3cde8dc3a9 Add support for HTTPS and basic HTTP authentication for Glances (#18608)
* Add support for SSL and basic HTTP auth

* Remove blank line at the end of the file
2018-11-21 12:38:42 +01:00
pbalogh77 3b53003795 Fibaro components (#18487)
* Added Fibaro omcponents

Added cover, light, sensor and switch components

* Improvements based on code review

Improvements based on code review

* Fixes based on code review

Fixes based on code review

* Changes to light behavior based on code review

Changes to light behavior based on code review

* Internal changes

Changed how brightness is represented internally.
It should have no impact on functionality.
2018-11-21 06:15:54 +01:00
Oleksii Serdiuk 01953ab46b Darksky: Expose missing conditions for day 0 forecast (#18312)
Dark Sky Sensor didn't expose conditions for day 0 (today forecast) that
had the same name as current conditions. With this change all conditions
form day 0 (today) forecast are exposed the same way as conditions for
the rest of the days (1..7): as `dark_sky_<condition>_<day>`. As a
consequence, conditions for day 0 that were already exposed now have
`_0` suffix. This actually improves the code by removing most of
special handling, based on condition name.

To get day 0 conditions the user now has to add `- 0` to `forecast`
configuration parameter.

Conditions, for which suffix `_0` appeared: `precip_accumulation`,
`temperature_high`, `temperature_low`, `apparent_temperature_high`,
`apparent_temperature_low`, `precip_intensity_max`, `moon_phase`.

This is a breaking change!

Closes #18205
2018-11-19 14:48:52 +01:00
Fredrik Erlandsson c1ca7beea1 Support for Point component (#17466)
* Minut Point support

* tox tests for Point

* config flow fixes

* fixes requested by @MartinHjelmare

* swedish translation :)

* fix tests
2018-11-19 12:52:21 +01:00
sdelliot afe21b4408 Re-adding the season attribute (#18523) 2018-11-18 18:35:36 -07:00