* implement correct state for rflink cover
* Fix linting error
* invert logic as local testing pointed out it should be reversed
* add period at the end to satisfy the linter
* First draft
* Generate device id
* No obscure registry
* Dont store config_entry_id in device
* Storage
* Small mistake on rebase
* Do storage more like entity registry
* Improve device identification
* Add tests
* Remove deconz device support from PR
* Fix hound comments, voff!
* Fix comments and clean up
* Fix proper indentation
* Fix pydoc issues
* Fix mochad component to not use self.device
* Fix mochad light platform to not use self.device
* Fix TankUtilitySensor to not use self.device
* Fix Soundtouch to not use self.device
* Fix Plex to not use self.device
* Fix Emby to not use self.device
* Fix Heatmiser to not use self.device
* Fix Wemo lights to not use self.device
* Fix Lifx to not use self.device
* Fix Radiotherm to not use self.device
* Fix Juicenet to not use self.device
* Fix Qwikswitch to not use self.device
* Fix Xiaomi miio to not use self.device
* Fix Nest to not use self.device
* Fix Tellduslive to not use self.device
* Fix Knx to not use self.device
* Clean up a small mistake in soundtouch
* Fix comment from Ballob
* Fix bad indentation
* Fix indentatin
* Lint
* Remove unused variable
* Lint
* Add Tahoma io:VerticalExteriorAwningIOComponent and io:HorizontalAwningIOComponent
* Fix position of horizontal awning cover
* Add timestamps for lock time
* Adjust open-close actions for horizontal awning cover
* Fix stop action for io:RollerShutterGenericIOComponent
* Remove redundant information
* Use get for dict lookup
* Add Genie Aladdin Connect cover component
* Fix lines being too long
* Fix issues found in review
* remove Unknown state, use None instead
* Fixed requirements_all
## Description:
More fixes flagged by pylint 2 that don't hurt to have before the actual pylint 2 upgrade (which I'll submit soon).
## Checklist:
- [ ] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
* Make mysensors component async
* Use async dispatcher and discovery.
* Run I/O in executor.
* Make mysensors actuator methods async.
* Upgrade pymysensors to 0.13.0.
* Use async serial gateway.
* Use async TCP gateway.
* Use async mqtt gateway.
* Start gateway before hass start event
* Make sure gateway is started after discovery of persistent devices
and after corresponding platforms have been loaded.
* Don't wait to start gateway until after hass start.
* Bump pymysensors to 0.14.0
* Gogogate2 - bump version
Uses latest version of library which ensures commands to device are idempotent
* Update requirements_all
* Expose sensor temperature
* update version
* import attribute
* Set temperature
* Remove temperature attribute
Removed temperature attribute until it can be re-implemented as a separate sensor.
* Update ordering
* Fix copy-&-paste issue
* add 2 devices
io:RollerShutterUnoIOComponent
io:ExteriorVenetianBlindIOComponent
* add 2 devices
* Update tahoma.py
* Fix hounci-bot violation
* Fixed Travis CI build failure
./homeassistant/components/cover/tahoma.py:83:13: E125 continuation line with same indent as next logical line
* Fixed Travis CI build failure
E125 continuation line with same indent as next logical line
* Fixed Travis CI build failure
E127 continuation line over-indented for visual indent
* Fix indent
* Change check
* Use 0/1 for GPIO writes rather than true/false
GPIO pins don't appear to respond to true/false writes, and this is reflected in code elsewhere. For example, in `\components\switch\rpio_gpio.py` the following code is used:
```
def turn_on(self, **kwargs):
"""Turn the device on."""
rpi_gpio.write_output(self._port, 0 if self._invert_logic else 1)
self._state = True
self.schedule_update_ha_state()
```
This code works. Hence this PR uses 0/1 in the raspberry pi GPIO cover, instead of true/false.
* Update rpi_gpio.py
* Upgrade pylint to 1.8.1
* Fix no-else-return
* Fix bad-whitespace
* Fix too-many-nested-blocks
* Fix raising-format-tuple
See https://github.com/PyCQA/pylint/blob/master/doc/whatsnew/1.8.rst
* Fix len-as-condition
* Fix logging-not-lazy
Not sure about that TEMP_CELSIUS though, but internally it's probably just like if you concatenated any other (variable) string
* Fix stop-iteration-return
* Fix useless-super-delegation
* Fix trailing-comma-tuple
Both of these seem to simply be bugs:
* Nest: The value of self._humidity never seems to be used anywhere
* Dovado: The called API method seems to expect a "normal" number
* Fix redefined-argument-from-local
* Fix consider-using-enumerate
* Fix wrong-import-order
* Fix arguments-differ
* Fix missed no-else-return
* Fix no-member and related
* Fix signatures-differ
* Revert "Upgrade pylint to 1.8.1"
This reverts commit af78aa00f125a7d34add97b9d50c14db48412211.
* Fix arguments-differ
* except for device_tracker
* Cleanup
* Fix test using positional argument
* Fix line too long
I forgot to run flake8 - shame on me... 🙃
* Fix bad-option-value for 1.6.5
* Fix arguments-differ for device_tracker
* Upgrade pylint to 1.8.2
* 👕 Fix missed no-member
* Entity#unique_id defaults to None
* Initial commit entity registry
* Clean up unique_id property
* Lint
* Add tests to entity component
* Lint
* Restore some unique ids
* Spelling
* Remove use of IP address for unique ID
* Add tests
* Add tests
* Fix tests
* Add some docs
* Add one more test
* Fix new test…
* added unavailability tracker, updated sensor component
* change hass argument position according to position in binary_sensor
* added hass argument to binary_sensor, updated is_on(), it can be UNAVAILABLE now
* updated switch component to support unavailability feature
* updated light component to support unavailability feature
* updated cover component to support unavailability feature
* set _hass property
* added unavailability tracker, updated sensor component
* change hass argument position according to position in binary_sensor
* added hass argument to binary_sensor, updated is_on(), it can be UNAVAILABLE now
* updated switch component to support unavailability feature
* updated light component to support unavailability feature
* updated cover component to support unavailability feature
* set _hass property
* fixed error with wrong arguments number during callback call
* reset unavailability state on new message received from device
* use locks to fix race condition during managing _state property
* overriden state() method for some components to check for STATE_UNAVAILABLE and return it instead e.g. STATE_OFF
* fixed linter
* removed blank line
* use available() method instead of changing _state
* filter motion sensors 'heartbeat', was removed from PyXiaomiGateway
* remove self._hass, use self.hass set by HA on attach
* self.push_data now running in the event loop, use async_schedule_update_ha_state()
* merge fix
* removed accidentally added home-assistant-polymer
* bump PyXiaomiGateway version to 0.8.0
* bump PyXiaomiGateway to 0.8.0
* updated methods names and annotations
* add pyhomematic support for ip and tiltable covers
* use cached data in current_cover_tilt_position
* check for existance not for None
* reformatting
* check node for LEVEL_2
* Strip off the RTS/IO ID from the entity ID
* Ignore exception thrown when the device does not provide an active state
* Send actions with a label for easier identification in the Tahoma log
* Linting
* Strip off the RTS/IO ID from the entity ID, take 2
As per suggestions, let HA do the standard initialization and assign
an appropriate entity_id, instead of overriding it with the lengthy
unique_id coming from the TaHoma devices.
* Adding support for Lutron Radio RA2 shades as cover components.
* Adding initial version of the Lutron shades component.
* Fixed line-length violation detected by Hound.
* Deprecate explicit entity_id in template platforms
* Use config validator for deprecation
* Fix copy/paste typos
* Also print the config value
* Add test for config validator
* Assert the module name that logged the message
* Lazy loading of service descriptions
* Fix tests
* Load YAML in executor
* Return a copy of available services to allow mutations
* Remove lint
* Add zha/services.yaml
* Only cache descriptions for known services
* Remove lint
* Remove description loading during service registration
* Remove description parameter from async_register
* Test async_get_all_descriptions
* Remove lint
* Fix typos from multi-edit
* Remove unused arguments
* Remove unused import os
* Remove unused import os, part 2
* Remove unneeded coroutine decorator
* Only use executor for loading files
* Cleanups suggested in review
* Increase test coverage
* Fix races in existing tests
* Issue #11432: Do not stop initializing KNX when tunelling device cant be reached
* Issue #11432: Mark devices as unavailable if gateway cant be connected
* Huge ISY994 platform cleanup, fixes support for 5.0.10 firmware
# * No more globals - store on hass.data
# * Parent ISY994 component handles categorizing nodes in to Hass components, rather than each individual domain filtering all nodes themselves
# * Remove hidden string, replace with ignore string. Hidden should be done via the customize block; ignore fully prevents the node from getting a Hass entity
# * Removed a few unused methods in the ISYDevice class
# * Cleaned up the hostname parsing
# * Removed broken logic in the fan Program component. It was setting properties that have no setters
# * Added the missing SUPPORTED_FEATURES to the fan component to indicate that it can set speed
# * Added better error handling and a log warning when an ISY994 program entity fails to initialize
# * Cleaned up a few instances of unecessarily complicated logic paths, and other cases of unnecessary logic that is already handled by base classes
* Use `super()` instead of explicit base class calls
* Move `hass` argument to first position
* Use str.format instead of string addition
* Move program structure building and validation to component
Removes the need for a bunch of duplicate exception handling in each individual platform
* Fix climate nodes, fix climate names, add config to disable climate
Sensor platform was crashing when the ISY reported climate nodes. Logic has been fixed. Also added a config option to prevent climate sensors from getting imported from the ISY. Also replace the underscore from climate node names with spaces so they default to friendly names.
* Space missing in error message
* Fix string comparison to use `==`
* Explicitly check for attributes rather than catch AttributeError
Also removes two stray debug lines
* Remove null checks on hass.data, as they are always null at this point
* Fire events for ISY994 control events
This allows hass to react directly to Insteon button presses (on switches and remotes), including presses, double-presses, and long holds
* Move change event subscription to after entity is added to hass
The event handler method requires `self.hass` to exist, which doesn't have a value until the async_added_to_hass method is called. Should eliminate a race condition.
* Overhaul binary sensors in ISY994 to be functional "out of the box"
We now smash all of the subnodes from the ISY994 in to one Hass binary_sensor, and automatically support both paradigms of state reporting that Insteon sensors can do. Sometimes a single node's state represents the sensor's state, other times two nodes are used and only "ON" events are sent from each. The logic between the two forunately do not conflict so we can support both without knowing which mode the device is in.
This also allows us to handle the heartbeat functionality that certain sensors have - we simply store the timestamp of the heartbeat as an attribute on the sensor device. It defaults to Unknown on bootup if and only if the device supports heartbeats, due to the presence of subnode 4.
* Parse the binary sensor device class from the ISY's device "type"
Now we automatically know which sensors are moisture, motion, and openings! (We also reverse the moisture sensor state, because Insteon reports ON for dry on the primary node.)
* Code review tweaks
The one material change here is that the event subscribers were moved to the `async_added_to_hass` method, as the handlers depend on things that only exist after the entity has been added.
* Handle cases where a sensor's state is unknown
When the ISY first boots up, if a battery-powered sensor has not reported in yet (due to heartbeat or a change in state), the state is unknown until it does.
* Clean up from code review
Fix coroutine await, remove unnecessary exception check, and return None when state is unknown
* Unknown value from PyISY is now -inf rather than -1
* Move heartbeat handling to a separate sensor
Now all heartbeat-compatible sensors will have a separate `binary_sensor` device that represents the battery state (on = dead)
* Add support for Unknown state, which is being added in next PyISY
PyISY will report unknown states as the number "-inf". This is implemented in the base ISY994 component, but subcomponents that override the `state` method needed some extra logic to handle it as well.
* Change a couple try blocks to explicit None checks
* Bump PyISY to 1.1.0, now that it has been published!
* Remove -inf checking from base component
The implementation of the -inf checking was improved in another branch which has been merged in to this branch already.
* Restrict negative-node and heartbeat support to known compatible types
Not all Insteon sensors use the same subnode IDs for the same things, so we need to use different logic depending on device type. Negative node and heartbeat support is now only used for leak sensors and open/close sensors.
* Use new style string formatting
* Add binary sensor detection for pre-5.x firmware
Meant to do this originally; writing documentation revealed that this requirement was missed!
* second try on rflink / cover
* no newline at end of file
* changed entity
* fixed comments from pvizeli
* removed :
* removed return 'unknown'
* Fixed comments from Rytilahti
* removed newline
* Reverted to None
* cleanup
* Cleanup
* MQTT Cover - Add availability_topic for online/offline status
Added topic, configurable payloads, and tests.
* Merge branch 'dev' into mqtt-cover-availability
* Revert "Merge branch 'dev' into mqtt-cover-availability"
This reverts commit 46d29794ba.
* Added newline at end of test_mqtt.py
* Fixed lint issue (newline at EOF)
* Fixed lint issue (newline at EOF)
* Updated call signature for other tests
* Fixed availability message callback
* Updated to latest AbodePy version. Added services and events. Added new device types. Added exclude, light, and polling config options.
* Disable the event service if polling is enabled.
* Addressed all CR's
* Removed duplicated super call.
* Name config option now used. Removed deprecated DEFAULT_NAME.
* Modified partial to move event to first param.
* rename xiaomi to xiaomi_aqara
* rename xiaomi vacuum and xiaomi phillips light to xiaomi miio
* update discovery and tests
* style
* update discovery and tests
* Still use Philips as name
* First draft of XKNX module for Home-Assistant
* XKNX does now take path of xknx.yaml as parameter
* small fix, telegram_received_callback has different signature
* changed method of registering callbacks of devices
* removed non async command lines from xknx
* telegram_received_cb not needed within HASS module
* updated requirements
* Configuration if XKNX should connect via Routing or Tunneling
* bumping version to 0.6.1
* small fix within xknx plugin
* bumped version
* XKNX-Switches are now BinarySensors and Logic from Sensor was moved to BinarySensor
* renamed Outlet to Switch
* pylint
* configuration of KNX lights via HASS config, yay!
* changed name of attribute
* Added configuration for xknx to switch component
* added support for sensors within hass configuration
* added support for climate within hass configuration
* Thermostat -> Climate
* added configuration support for binary_sensors
* renamed Shutter to Cover
* added configuration support for cover
* restructured file structure according to HASS requirements
* pylint
* pylint
* pylint
* pylint
* pylint
* pylint
* updated version
* pylint
* pylint
* pylint
* added setpoint support for climate devices
* devices are now in a different module
* more asyncio :-)
* pydocstyle
* pydocstyle
* added actions to binary_sensor
* allow more than one automation
* readded requirement
* Modifications suggested by hound
* Modifications suggested by hound
* Modifications suggested by hound
* Modifications suggested by hound
* xknx now imported as local import
* hound *sigh*
* lint
* 'fixed' coverage.
* next try for getting gen_requirements_all.py working
* removed blank line
* XKNX 0.7.1 with logging functionality, replaced some print() calls with _LOGGER
* updated requirements_all.txt
* Fixes issue https://github.com/XKNX/xknx/issues/51
* https://github.com/XKNX/xknx/issues/52 added raw access to KNX bus from HASS component.
* bumped version - 0.7.3 contains some bugfixes
* bumped version - 0.7.3 contains some bugfixes
* setting setpoint within climate device has to be async
* bumped version to 0.7.4
* bumped version
* https://github.com/XKNX/xknx/issues/48 Adding HVAC support.
* pylint suggestions
* Made target temperature and set point required attributes
* renamed value_type to type within sensor configuration
* Issue https://github.com/XKNX/xknx/issues/52 : added filter functionality for not flooding the event bus.
* suggestions by pylint
* Added notify support for knx platform.
* logging error if discovery_info is None.
* review suggestions by @armills
* line too long
* Using discovery_info to notifiy component which devices should be added.
* moved XKNX automation to main level.
* renamed xknx component to knx.
* reverted change within .coveragerc
* changed dependency
* updated docstrings.
* updated version of xknx within requirements_all.txt
* moved requirement to correct position
* renamed configuration attribute
* added @callback-decorator and async_prefix.
* added @callback decorator and async_ prefix to register_callbacks functions
* fixed typo
* pylint suggestions
* added angle position and invert_position and invert_angle to cover.knx
* typo
* bumped version within requirements_all.txt
* bumped version
* Added support for HVAC controller status