* - Fixes Fitbit error when trying to refresh oauth token
The 3rd python-fitbit module requires an extra kwarg on the FitBit
constructor called refresh_cb. The value should be a function that
accepts one argument token.
This value will be a dictionary with the keys:
'access_token', 'refresh_token', 'expires_at'
This implements a lambda refresh_cb as required by the Fitbit module
to work, however the new token will always be save manually on
every update() call.
* Simplified by calling expires_at instead reading again from dict
* fix not providing device for discovered directvs
This fixes a bug introduced at 6884965c80
Discovered directv boxes would not be instantiated with a DEVICE
parameter.
Signed-off-by: Nicholas Sielicki <sielicki@yandex.com>
* directv: add discovery of RVU clients
If discovery is used with directv, also try to further discover and
configure RVU client set-top boxes by requesting information from a REST
service running on the main directv box/RVU-server.
This commit also disables discovery if any directv configuration is
supplied by the user.
Signed-off-by: Nicholas Sielicki <sielicki@yandex.com>
* components/media_player/directv.py: use hass.data
Use hass.data instead of a global to remember state.
Signed-off-by: Nicholas Sielicki <sielicki@yandex.com>
* unconditionally import requests in directv.py
Requests is a core requirement, so we're okay to import at the top of
the file rather than conditionally / in a function.
Signed-off-by: Nicholas Sielicki <sielicki@yandex.com>
* Bayesian Binary Sensor
Why:
* It would be beneficial to leverage various sensor outputs in a
Bayesian manner in order to sense more complex events.
This change addresses the need by:
* `BayesianBinarySensor` class in
`./homeassistant/components/binary_sensor/bayesian.py`
* Tests in `./tests/components/binary_sensor/test_bayesian.py`
Caveats:
This is my first time in this code-base. I did try to follow conventions
that I was able to find, but I'm sure there will be some issues to
straighten out.
* minor cleanup
* Address reviewer's comments
This change addresses the need by:
* Removing `CONF_SENSOR_CLASS` and its usage in `get_deprecated`.
* Make probability update function a static method, and use single `_`
to match project conventions.
* Address linter failures
* fix `device_class` declaration
* Address Comments
Why:
* Not validating config schema enough.
* Not following common practices for async initialization.
* Naive implementation of Bayes' rule.
This change addresses the need by:
* Improving config validation for observations.
* Moving initialization logic into `async_added_to_hass`.
* Re-configuring Bayesian updates to allow true P|Q usage.
* address linting issues
* Improve DRYness by adding `_update_current_obs` method
* update doc strings and ensure functions are set up properly for async
* Make only 1 state change handle
* fix style
* fix style part 2
* fix lint
* Updated abodepy version to 0.7.1
* Refactored to use AbodeDevice. Added Abode Lock device.
* Added push updates to abode devices.
* Upgraded to 0.7.2 after finding issue with callbacks.
* Refactored to use AbodeDevice. Added Abode Lock device.
* Added push updates to abode devices.
* Upgraded to 0.7.2 after finding issue with callbacks.
* Bumped version to 0.8.2. Modified code to work with new constants and properties. Added cover and switch.
* Fixed hound violations.
* Updated to 0.8.3 to fix small bug with standby mode. Fixed comment in cover/abode.py.
* Fix lint issues
* Removed excessive logging. Moved device callback registration to async_added_to_hass. Moved abode controller from global into hass data.
* Removed explicit None from dict.get()
* Move device class into the constructor.
* Changed constant name to platforms.
* Changes as requested.
* Removing stray blank line.
* Added blank line of which I'm not sure how it was removed.
* Updated version to 0.9.0. Fixed motion sensor. Added power_switch_meter device type.
* Update abode.py
* fix lint
* Fix and optimize digitalloggers platform
* Fix line length
* Fix hanging indentation
* Add missing docstring
* Add period to end of docstring
* Add second blank line
* Prevent error when no forecast data was available
Prevent an Error when buienradar data was available, but no forecasted data was retrieved for the requested day.
* Update buienradar.py
* Update buienradar.py
* Prevent iCloud exceptions in logfile
With this change ValueError exceptions in the logfile caused by this component will disappear.
These errors are caused by the iCloud API returning an HTTP 450 error and the external lib throwing a ValueError because of it.
A PR has been raised against the external library, but that fix did not yet make it into a new version of the library. This will catch the exception in the mean time.... https://github.com/picklepete/pyicloud/pull/138
* Align log messages
* Mysensors nodes can be renamed in the config file
* Replace nodes array with dict. Replace whole name of the node.
* Improved iteration on node names
While waiting for a new pyfoscam release, we can fix this for users
just by changing the import. Foscam devices a pretty widely deployed,
so a regression here is definitely no fun.
Fixes Bug #8940
* Adds support for the Xiaomi Philips LED Ball and Ceiling Lamp
* Documentation url updated.
* New component to .coveragerc added.
* Unused import removed.
* translate labeled as static method.
* Mixed parameters in log message fixed.
* Order of requirements_all.txt fixed.
* Plattform updated. It's async now.
* Simplifiable if-statement fixed.
* Some more clean-up of unneeded stuff.
* Platform schema updated.
* Component is called xiaomi_philipslight now.
* Requirements all updated.
* Initialization of some variables updated.
* Raise PlatformNotReady exception if light cannot be discovered.
* Import of math removed.
Missing space added.
* Remove unnecessary updates
* Refactor mysensors callback and add validation
* Add mysensors entity class. The mysensors entity class inherits from
a more general mysensors device class.
* Extract mysensors name function.
* Add setup_mysensors_platform for mysensors platforms.
* Add mysensors const schemas.
* Update mysensors callback and add child validation.
* Remove gateway wrapper class.
* Add better logging for mysensors callback.
* Add discover_persistent_devices function.
* Remove discovery in mysensors component setup.
* Clean up gateway storage in hass.data.
* Update all mysensors platforms.
* Add repr for MySensorsNotificationDevice.
* Fix bug in mysensors climate target temperatures.
* Clean up platforms. Child validation simplifies assumptions in
platforms.
* Remove not needed try except statements. All messages are validated
already in pymysensors.
* Clean up logging.
* Add timer debug logging if callback is slow.
* Upgrade pymysensors to 0.11.0.
* Make dispatch callback async
* Pass tuple device_args and optional add_devices
* Also return new_devices as list instead of dictionary.
* Emulate set_current_position in cover.template
* Add opportunistic mode
* Prevent another move when cover is already moving. Add tests for opotunistic/timed-delay mode
* Remove timed-move capabilities
* Set init state to unknown
* cleanup template
* Update test_template.py
* Simplisafe unknown status fix
Changed simplisafe-python requirement to 1.0.5 and changed state return
case statements to lower case
* Bump requirements_all.txt
* cast strings to integers for hsv_to_rgb conversion, fixes#6473
* remove type_checking, flake8 does not like that.
* use hsv_to_rgb to convert to correct rgb value
* Support changing the bulb color for tplink smartbulbs, related to #8766
* existence of ATTR_RGB_COLOR in kwargs, not just its existence...
* return modified supported features
* rgb-hsv conversion utils from hass return bogus values (at least for this device), so doing conversions directly with colorsys
* add typing & documentation for color model conversions
* make linters happy
* cast hsv to integer before passing it to the backend library
* make sure the bulb is on before adjusting the other settings
* allow floats as inputs for conversions, return always integers
* use typing hint in the parameter list instead of at assignment
* do not assign local color state inside turn_on, but let update handle doing it
* use forward declaration for typing, fixes travis requirements build hopefully
* rename hsv and rgb
* remove type-checking check, forward declarations should work just fine without it
* disable (broken) pylint warnings, these can be removed after astroid is updated from 1.4.9 to 1.5
* Pilight switch: restore last state after restart
This uses the restore_state helper to set the last known state to
pilight switches when the devices are initialized after a HA
restart.
Without this HA forget the state on every restart and needs to be told
the sttae by retoggling the switches. This can cause unwanted effects
as a switch toggling may emit an RF signal.
* Make hound happy
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Remove entity_id generation as requested in review.
* Make hound happy again.
* fix comments
* fix lint
* Add support for offset for the workday sensor
* Update tests for workday sensor
* Changed from 'offset' to 'days_offset'
* Attributes bugfix (dictionary key variable repeated with different values)
* Add support for Prowl notifications.
* Use HA session handler.
* Simplify http request logic.
* flake
* fix double fetch data
* Remove periods from log messages
* Get full multizone state during registration
We used to rely on the periodic update to get the state of each zone, only
establishing the number of zones during registration. This resulted in errors
if the current state was needed for a partial color change before the first
async_update happened.
Now we do a full update before adding the light. Thus async_update can no
longer assume device.color_zones to be defined and must instead use the
response message to decide the total number of zones.
* Insist on getting the initial state
If a response to the initial state query is lost we used to just carry on.
This resulted in type errors when we next tried to access the undefined state.
After this commit the light is not added before we have the full state.
This scenario mostly happens when something is misbehaving and the type errors
were actually useful in figuring out what happend. So an error message is
logged in their place.
* Remove lint
* Update fitbit.py
Add variable icon for battery status, clean up formatting for resource
names and values
* Update fitbit.py and requirements_all.txt
Fix PR comments and update client
* Update fitbit.py
Add dict map for battery levels and use icon util
* Update ios.py
Clean up battery and charging icons (MDI was missing some versions),
fix minor bug when battery level = 95%
* Update ios.py
Migrated function to battery icon util
* Inital USPS Camera expansion
* Cleanup debugging, add camera change interval
* Change to local nomail image
* Explicitly pass in date
* Move camera date info to model property
* Fix copy typo
* Fix hound line-length
* Fix lint whitespace
* Fix requirements
* Bump myusps version, clarify interval, alter update scheme
* Add units
* Code cleanup, address comments
* Use built-in scan interval, remove nomail image
* Remove logging line
* Add HipChat notify service.
* Change HipChat notify service to use python-simple-hipchat-v2.
* Change HipChat notify service to use hipnotify
* Change HipChat notify service to remove redundant validation
* Update to pyenvisalink 2.2, and remove range validation on zonedump interval.
* Keep using default timer dump variable, only remove minimum check.
* Fix lint issue
* Indentation issue
* Add support for Automatic OAuth2 authentication
* Fix async conversion of configurator
* Rename method for async
* Use hass.components to get configurator component
* Fix typo
* Move session data to hidden directory
* Make configurator callback optional
* Fixed cert_expiry sensor to delay firing on HA startup
* Addressed Travis complaints
* Added imports
* Fixed cert_expiry sensor to delay firing on HA startup
* Changed comment
* Added possibilities to use template in the command_line sensor
* Minor style guideline conforms
* Minor style guideline conforms
* Added new test for template rendering
* Minor style guideline conforms
* Minor style guideline conforms
* Fixed failing testcases
* Fix style violations
* fix code pretty
* Add new device tracker for Huawei Routers.
This was tested with the HG8247H model, used by Vodafone
Portugal for the Fiber service.
* add to .coveragerc; remove import and space
* add comments and fix lint
* rename methods
* huawei_router: add constants to scanner class
* huawei_router: remove lock; use format() in string
* huawei_router: use tupple instead of member only class
* huawei_router: reduce min scan time
* huawei_router: lint
* huawei_router: lint
* huawei_router: add missing lines in imports
* huawei_router: correctly decode string after router firmware update
* Remove things that is done on core now
* LIFX: improve performance of multi-light transitions
To avoid hub overload, the light.turn_on call will change each light
sequentially.
As LIFX has no hub we can safely increase performance by starting all
light transitions concurrently.
* Improve state updates after light changes
The light.turn_on call will set a new state and then immediately read it
back. However, reading the state of a LIFX light right after a state
change can still return the old value.
To handle this situation we have previously delayed the update request a
little while to allow a potential state change to settle. Because light
updates are now run in parallel, this delay might be too short when many
lights are set at once.
This commit introduces a per-light Lock to make it explicit when the
state cannot yet be trusted.
We must then do the state update ourselves. This was already done at the
end of a long transition and that code can be reused for also doing the
update at the start of a transition.
* Add RainMachine switch platform
* Updated requirements_all.txt
* Cleaning up CI and coverage results
* Small update to deal with older pylint
* Fixed small indentation-based error
* Added some more defensive try/except logic around calls
* I'm not a fan of importing a library multiple times :)
* Making PR-requested changes
* Fixed ref to positional parameter
* Attempting to fix broken linting
* Ignoring no-value-for-parameter pylint error
* Implement Roomba fanspeed
* Fix: fan_speed_list is always empty
* Log instead of raising an exception when incorrect fan speed has been provided
* Don't attempt to set any preference if fan speed is invalid
* Initial implementation of Asterisk Mailbox
* Rework asterisk_mbox handler to avoid using the hass.data hash. Fix requirements.
* Handle potential asterisk server disconnect. bump asterisk_mbox requirement to 0.4.0
* Use async method for mp3 fetch from server
* Add http as dependency
* Minor log fix. try to force Travis to rebuild
* Updates based on review
* Fix error handling as per review
* Fix error handling as per review
* Refactor voicemail into mailbox component
* Hide mailbox component from front page
* Add demo for mailbox
* Add tests for mailbox
* Remove asterisk_mbox sensor and replace with a generic mailbox sensor
* Fix linting errors
* Remove mailbox sensor. Remove demo.mp3. Split entity from platform object.
* Update mailbox test
* Update mailbox test
* Use events to indicate state change rather than entity last-updated
* Make mailbox platform calls async. Fix other review concerns
* Rewrite mailbox tests to live at root level and be async. Fixmailbox dependency on http
* Only store number of messages not content in mailbox entity
* Add new service `clean_spot` to vacuums
- Add as base component service, with associated support flag to make it optional
- Implement on Demo vacuum
- Implement on Xiaomi vacuum
- Update tests for platforms Demo and Xiaomi
- Change default icon for vacuums to `mdi:roomba`, but keep the one for the Xiaomi
- (In a polymer PR: add new service to command toolbar in the 'more-info' card)
* Add `clean_spot` service description
* fix default properties for vacuum component
* Do not use pychromecast.Chromecast for Cast Groups
pychromecast.Chromecast creates Chromecast instance with friendly_name and cast_type of the device and not of a group.
Which leads to collisions
* Update cast.py
* using hass.data
* Fixed and extended tests
* Line length in tests
* Lint in tests
* Added support for Egardia / Woonveilig alarm control panel
* Added support for Egardia / Woonveilig alarm control panel
* Added support for Egardia / Woonveilig alarms
* Updating egardia support with exception handling and other fixes
* Egardia platform, requirements file updated
* Fixing state checking
* Adding exception handling
* Removing unnecessary logging
* Removing unnecessary logging
* Updating to egardiadevice component 1.0.10
* Improving exception handling
* Adding implementation of egardiaserver for alarm triggered status
* Clean-up
* Fix my previous change
* Fix tests for Demo vacuum platform (and increase coverage)
* increase coverage of xiaomi vacuum tests and include in coverage
Also little fixes
* remove print statement
* Add DEBUG-level log for db row to native object conversion
This is now the bottleneck (by a large margin) for big history queries, so I'm leaving this log feature in to help diagnose users with a slow history page
* Rewrite of the "first synthetic datapoint" query for multiple entities
The old method was written in a manner that prevented an index from being used in the inner-most GROUP BY statement, causing massive performance issues especially when querying for a large time period.
The new query does have one material change that will cause it to return different results than before: instead of using max(state_id) to get the latest entry, we now get the max(last_updated). This is more appropriate (primary key should not be assumed to be in order of event firing) and allows an index to be used on the inner-most query. I added another JOIN layer to account for cases where there are two entries on the exact same `last_created` for a given entity. In this case we do use `state_id` as a tiebreaker.
For performance reasons the domain filters were also moved to the outermost query, as it's way more efficient to do it there than on the innermost query as before (due to indexing with GROUP BY problems)
The result is a query that only needs to do a filesort on the final result set, which will only be as many rows as there are entities.
* Remove the ORDER BY entity_id when fetching states, and add logging
Having this ORDER BY in the query prevents it from using an index due to the range filter, so it has been removed.
We already do a `groupby` in the `states_to_json` method which accomplishes exactly what the ORDER BY in the query was trying to do anyway, so this change causes no functional difference.
Also added DEBUG-level logging to allow diagnosing a user's slow history page.
* Add DEBUG-level logging for the synthetic-first-datapoint query
For diagnosing a user's slow history page
* Missed a couple instances of `created` that should be `last_updated`
* Remove `entity_id` sorting from state_changes; match significant_update
This is the same change as 09b3498f41 , but applied to the `state_changes_during_period` method which I missed before. This should give the same performance boost to the history sensor component!
* Bugfix in History query used for History Sensor
The date filter was using a different column for the upper and lower bounds. It would work, but it would be slow!
* Update Recorder purge script to use more appropriate columns
Two reasons: 1. the `created` column's meaning is fairly arbitrary and does not represent when an event or state change actually ocurred. It seems more correct to purge based on the event date than the time the database row was written.
2. The new columns are indexed, which will speed up this purge script by orders of magnitude
* Updating db model to match new query optimizations
A few things here: 1. New schema version with a new index and several removed indexes
2. A new method in the migration script to drop old indexes
3. Added an INFO-level log message when a new index will be added, as this can take quite some time on a Raspberry Pi
* Xiaomi vacuum as component with switch, sensors and services
- Conversion from switch platform to async component.
- Add services proposed in #8416 to the new component, with shorter names.
- Add sensors for the vacuum robot as a selectable list from `battery`, `state`, `error`, `fanspeed`, `clean_time` and `clean_area` (the state attributes of the switch). The sensors don't poll, but listen to a signal to update the state, the switch fires this signal when updating.
- Assign default icons to sensors and the switch (`mdi:google-circles-group` looks like the robot!)
* path change in requirements_all (from switch platform to component)
* copy pasting is a bad habit
* services to the components services.yaml, modify .coveragerc
* review: use with multiple hosts, fix calls to async_add_devices, fix ranges for services
* `icon_for_battery_level` util method
* Xiaomi vacuum as platform of new component vacuum
- Created new component `vacuum` from a ToggleEntity.
- Add services `turn_on`, `turn_off`, `cleaning_play_pause`, `stop`, `return_to_base`, `locate`, `set_fanspeed` and `send_command`.
- Remove the main switch for the xiaomi vacuum (the toggable main entity is the switch).
- Add `support flags` for the common services
- Assign default icons to sensors and the switch (`mdi:google-circles-group` looks like the robot!)
- Move services descriptions to a yaml file for the new component.
- Update requirements_all.
- Update coveragerc.
* fix coveragerc
* fix battery icon helper to use more icons
* remove sensors, create properties and support flags for custom UI
* cleaning
* updated state_attrs for filtering in UI, renamed platform to simply `xiaomi`
* fix platform rename
* change fanspeed and expose `fanspeed_list` to use speed steps
* minor fixes
- Rename service `start_pause`
- Add 'Error' attribute only if `got_error`.
- Minor changes
* rename state attrs
* rename state attrs
* review changes: cut fan__speed, style changes, remove logging, and more
* add ATTR_COMMAND = 'command' to const
* pop entity_id from service data
* remove property accessor for vacuum object
* lint fix
* fix extra attrs names
* module level functions for calling the services
* params as optional keyword for `send_command`
* params as optional keyword for `send_command`, remove debug logs
* explicit parameters for `set_fan_speed` and `send_command`
* Demo platform for the vacuum component
* vacuum tests for the Demo platform
* some fixes
* don't omit vacuum
* vacuum tests for the Xiaomi platform
* fix test
* fix
* fix xiaomi test
* fix coveragerc
* test send command
* fix coveragerc
* fix string formatting
* The coverage is to low. It need 93% or more
* Allow reporting some state attributes as tags to InfluxDB
Some state attributes should really be tags in InfluxDB. E.g.
it is helpful to be able to group by friendly_name, or add a custom
attribute like "location" and group by that. Graphs in Grafana are much
easier to read when friendly names are used, and not node ids.
This commit adds an optional setting to InfluxDB config:
'tags_attributes'. Any attribute on this list will be reported as tag
and not as field to InfluxDB.
* Allow overriding InfluxDB measurement for each reported item separately
Bundling all items with the same "unit of measurement" together does not
always makes sense. For example, both "relatively humidity" and "battery
level" are reported as "%", but I'd rather see them as separate
measurements in InfluxDB. This commit allows for 'influxdb_measurement'
attribute. When set on node, it will take precedence over the global
'override_measurement' and component-specific 'unit_of_measurement'.
* Minor updates to InfluxDB component improvements, as suggested by
@MartinHjelmare.
* Moved per-component config from 'customize' into 'influxdb'
configuration section. The following three sub-sections were added:
'component_config', 'component_config_domain' and
'component_config_glob'. The sole supported per-component attribute
at this point is 'override_measurement'.
* Lint
* Fixed mocked entity_ids in InfluxDB tests to be in domain.entity_id
format, to satisfy EntityValues requirements.
* Added tests for new InfluxDB configuration parameters
* Fixes to some docstrings
* Add mochad light component
This commit adds a new component to control x10 dimmers/lights with
mochad.
* Create comm_type and address constants
The comm_type and address conf constants are shared between all mochad
devices because they are required information used for configuring a
device. This commit moves the definition into const.py so they're
consistent between all component types.
* Add support for LaunchRequest alexa intent
* Support LaunchRequest for multiple skills
* formatting
* adding tests to cover launch request
* formatting
* flux_led: support for property "available"
* Implemented changes from code review
* Implemented changes from code review
* Implemented changes from code review
* Honeywell fixes and improvements
Give the Honeywell device a state ('On', 'Off', etc) that
can be displayed to user and understood by other components.
Previously this was always 'Unknown'. Update also raises a
state_changed event when a new temperature is polled.
These two together fix an issue (#8688) where Honeywell
climate data couldn't be logged in InfluxDB.
* Roll back some changes
These were not necessary to achieve the result I wanted.
* Renamed RoundThermostat's 'device' member for greater clarity
Now called 'client'
* Improve and simplify discovering thermostat mode
Per code review, this is a rather neater way to discover the thermostat mode
* Update tests for compatibility with new component
The tests previously relied upon the update() method being
called in the constructor. This is no longer the case.
* Address formatting review comment
Parens not necessary
* This system mode is not certain to apply to domestic hot water
Moved the mode lookup to only happen on update of radiator devices,
since hot water devices seem to be treated differently and I can't test.
* Allow sonos to select playlists as a source
Most of this was taken from
https://github.com/home-assistant/home-assistant/issues/5598#issuecomment-278229895
however I made a few small improvements so that it works for other
services than Spotify and it should properly switch to playing the queue
if you had another song playing previously.
/cc @PatBoud
* Attempt to fix style issues
* More indent changes
* Fix misplaced period
* Move playlist replacement to function
* Privatize replace_queue_with_playlist and explain
* Remove unneeded decorator
* Fix doc formatting
* Added support to enable/disable motion detection for foscam cameras. This support was added in 0.48.1 as a generic service for cameras. Motion detection can be enabled/disabled for foscam cameras with this code-set.
* Fixed the violation identified by hound-bot
* Fixed the comment posted by HoundCI-Bot regarding using imperative mood statement for pydocstyle
* Fixed the error that travis-ci bot found.
* As per comment from @balloob, Instead of directly using the URL to talk to foscam, used a 3rd party foscam library to communicate with it. This library already has support to enable/disable motion detection and also APIs to change the motion detection schedule etc. Need to add more support in the pyfoscam 3rd party library for checking if motion was detected or even if sound was detected. Once that is done, we can add that into HASS as well.
* Lint
* Removed the requests library import which is not used anymore
* Updating requirements_all.txt based on the code-base of home assistant that i have. Generated using the gen_requirements_all.py script
* Updating requirements_all.txt and requirements_test_all.txt generated by gen_requirements_all.py after latest pull from origin/dev
* Updated requirements_all.txt with script
* Updated the foscam camera code to fix lint errors
* Fixed houndci violation
* Clean up remote component
* Don't have device be required in send_command service and method.
* Don't have entity_id be required in the base service schema.
* Don't always add activity in the data dict for a service call.
* Update harmony remote platform according to new service schema.
* Remove not needed properties and attributes from the Kira remote
platform.
* Add send_command method to demo platform.
* Add tests and remove duplicate tests.
* Break out required argument as positional argument
* added invert_state optional parameter
* removed superfluous parens
* moved state inversion to the is_closed method
* added relay_invert feature
* fixed syntax to comply with houndci-bot rules
* changed state_invert to invert_state and relay_invert to invert_relay
* New media_player platform for Russound devices using the RIO protocol
Auto discovers zones and sources
Handles media metadata from sources that support it
asyncio implementation
Push updates for any zone or source changes so no polling required.
* Fixed up linting issues
* Addressing PR feedback
Updated russound_rio dependency to 0.1.3
Use enumerate_zones and enumerate_sources methods instead of doing it in
the platform.
Register callbacks in async_added_to_hass coroutine
Corrected behavior of async methods
DirectPy, the third party library used for controlling directv boxes,
has the ability to accept an ID in order to act as a remote for Genie
slaves instead of just the master directv box. This commit adds glue
such that one can configure home assistant to interface with these slave
genie boxes.
Signed-off-by: Nicholas Sielicki <sielicki@yandex.com>
* Add new component for TPLink light bulbs.
* Update with result of gen_requirements_all.
* Add new component light.tplink.
* Move I/O outside of properties as per https://goo.gl/Nvioub.
* Fixed issue with routers in bridge mode
- Router in brdige mode apparently don't report all of the stats
- Re-wrote the data_format function so it's a bit easier to follow and able to log keys that aren't supported by a router in a given mode
- Changed config so that it properly ignores conditions when not explicitly listed
- Added tests to check for the above and also to verify we log that a key doesn't exist rather than throwing an exception
* Mistakenly was calling MONITORED_CONDITIONS in data_format
- Changed to be the actual config values to prevent log error