* Add support for HomeKit doorbell
* Update homeassistant/components/homekit/type_cameras.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/homekit/type_cameras.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* add speaker service for doorbells
* fixed test as doorbell char requires null value
* removed null value for doorbell presses. and removed broken override of default values
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add support for dimmable lights
* Fix formatting
* Add supported features test on Bond Light
* Add more tests to bond light and fixes comments
* Fix rebase conflict resolution
* Apply suggestions from code review
Co-authored-by: Chris Talkington <chris@talkingtontech.com>
* Add support for multiple time triggers in automations
* Attach with single callback
* Patch time in tests
* Improve test coverage
* Adjusting my facepalm moment
Through some testing with the samsungtvws library, it was determined
that the issue is related to the short read timeout (1s). Increasing
the timeout to 10s should solve the issue.
* Don't schedule an update if the hass instance isn't instantiated
If we get a status update packet before self.hass exists, we trip a
"assert self.hass is not None" that was added in 0.112 and setup fails.
* Fix callback hander properly
The right fix is to register the callback after hass is ready for it.
* Remove unnecessary check
This is now guaranteed by the core code.
* Don't request an immediate device update and do an async connect.
* Remove unnecessary return
When speedtest starts up, it would saturate the network interface and cause other
integrations to randomly fail to setup. We now wait to do the first speed test
until after the started event is fired.
* Dimming duration fix
Fixes#38068 - allows dimming duration to 7620 (default of 7621)
* Forgot to commit my test updates
* Added backwards compatibility with pre-150+ builds
Added tests for backwards compatibility
* Upped the build number cut off
* Add check for major.minor version as well
* Fix major.minor detection
* Adjust variable name
* Adjust version checking logic
* Math is hard
* Rename files, adjust test names
* Update doc string
Automations or HomeKit may turn the device on multiple times
when the current activity is already active which will cause
harmony to lose state. This behavior is unexpected as turning
the device on when its already on isn't expected to reset state.
* Add Abode camera controls
* Add tests for camera turn on and off service
* Bump abodepy version
* Bump abodepy version and updates to reflect changes
* Update manifest
* Support multiple camera stream in HomeKit
* Update homeassistant/components/homekit/type_cameras.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Revert "Update homeassistant/components/homekit/type_cameras.py"
This reverts commit d7624c5bff.
* Update homeassistant/components/homekit/type_cameras.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/homekit/type_cameras.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* black
* bump pyhap
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
We would connect to the hub via discovery and via setup
around the same time. This put additional load on the hub
which can increase the risk of timeouts.
Added support for new 2020 version of the Aqara D1 double wall switch (lumi.remote.b286acn02)
Confirmed that all button press events use the same codes after updating deconz rest api to add support for this switch.
A contributor of the API currently has the working version @ git clone --branch Legrand-teleruptor https://github.com/Smanar/deconz-rest-plugin.git
* Fix Xbox Live component
The API moved to a different domain, so the integration was broken.
The library upgrade contains the required fixes.
* Fix API connectivity check
* Access dict values directly
* Add binary sensor support to motion sensors and smoke detectors
* Add support for new sensor events as binary sensors
Adds a default device_class for motion sensors and smoke detector
* Use device type instead of event to set class
* Add some additional binary values
* Fix SimpliSafe to work with new MFA
* Code review (part 1)
* Input needed from Martin
* Code review
* Code review
* Restore YAML
* Tests
* Code review
* Remove JSON patching in tests
* Add reauth test
* One more reauth test
* Don't abuse the word "conf"
* Update homeassistant/components/simplisafe/config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Test coverage
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
for scenarios of enabling/disabling (~ creating/removing) entities,
so it does not trigger in removal if a `to: xxx` is defined, and also
does not trigger in creation if a `from: xxx` is present.
* Add set_central_heating_ovrd service to opentherm_gw
* Use await instead of async_create_task
Use await instead of async_create_task as per review.
Co-authored-by: J. Nick Koston <nick@koston.org>
* Use boolean values for service call to opentherm_gw.set_central_heating_ovrd
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update const.py
Added device class "IPKeyBlindMulti" to const.py in order to support HomematicIP device HmIP-DRBLI4. The site package pyhomematic supports this class already in actors.py.
* Update const.py
* Refactor bond integration to centralize update state logic in single superclass
* Refactor bond integration to centralize update state logic in single superclass
* Ensure we do not start discovered flows until after the start event has fired
This change makes zeroconf and ssdp match discovery behavior of not
creating config flows until the start event has been fired. This
prevents config flow creation/dependency installs for discovered
config flows from competing for cpu time during startup.
* Start discovery/service browser/ssdp when EVENT_HOMEASSISTANT_STARTED is fired instead of EVENT_HOMEASSISTANT_START
* Implement unload entry
* Change async_remove to remove
* Pop data from hass.data
* Change sequence order in unload
* Dont unload internal when unload platforms fail
* Fix color temp math
* Ran black --fast
* Update test_light.py
* tweaking mireds
* updating comments
* fixing test_light to match standards
* fixing comments, need coffee
* WOLF Smart-set integration
* Removed translations. Changed device class of timestamp. Added new test for unknown exception
* Remove unit_of_measurement from hours sensor
* Code cleanup. Pull Request comments fixes
* ConnectError import change. Removed DEVICE_CLASS_TIMESTAMP
* Add unique id guard with tests. Use common translations. Move device_id resolution to config_flow.
* Remove debug print
This issue has been corrected and then reverted multiple times.
It seems that the core issue was a casing one (On/off vs On/Off) ; for better
matching with a real Hue hub, also add the productname.
Tested to work with echo 2 and echo 5.
* Close the ADB connection on HA stop
* Get the test to pass
* Remove unnecessary test code
* Register the callback sooner
* '_async_stop' -> 'async_close'
* 'async_close' method -> '_async_close' function
* Make sensor and binary_sensor inherit from base class
* Drop several pointless public properties
* Make sure base function has same parameters
* Drop pass
* Missed one
* Adjust inherit order
* Passes secure parameter when setting up Nuki (#36844)
* Adds an additional configuration option for soft bridges instead of passing True when setting up the bridge
* Revert "Adds an additional configuration option for soft bridges instead of passing True when setting up the bridge"
This reverts commit af1d839ab1.
* Add event attribute to display last received event
* Restore state using event attribute
* Allow empty dict for device config
* Must also validate normal case
* Do early return
* Refactor cached ZHA channel reads.
If doing a cached ZCL attribute read, do "only_from_cache" read for
battery operated devices only. Mains operated devices will do a network
read in case of a cache miss.
* Use cached attributes for ZHA electrical measurement
* Bump up ZHA zigpy dependency.
* Remove support for legacy logbook events created before 0.112
Reduce the complexity of the logbook code. This
should also have a small performance boost.
* None is the default
Most of the the template platforms would check for
extract_entities failing to extract entities and avoid
setting up a state change listner for MATCH_ALL after
extract_entities had warned that it could not extract
the entities and updates would need to be done manually.
This protection has been extended to all template platforms.
Alter the behavior of extract_entities to return the
successfully extracted entities if one or more templates
fail extraction instead of returning MATCH_ALL
async_track_state_change_event is faster than async_track_state_change
and since we do not care about the data being returned to the callback
this is a simple speedup
async_track_state_change_event is faster than async_track_state_change
and since we do not care about the data being returned to the callback
this is a simple speedup
* Switch async_track_state_change to the faster async_track_state_change_event part 4
Calling async_track_state_change_event directly is faster than async_track_state_change (see #37251) since async_track_state_change is a wrapper around async_track_state_change_event now
* pylint
Calling async_track_state_change_event directly is faster than async_track_state_change (see #37251) since async_track_state_change is a wrapper around async_track_state_change_event now
Calling async_track_state_change_event directly is faster than async_track_state_change (see #37251) since async_track_state_change is a wrapper around async_track_state_change_event now
Previously, the media_content_id field would contain the track name, which
appears was a regression when the Spotify integration was rewritten in
7e4b9adc. The media_content_id now reverts to containing the Spotify
track 'uri' field, which has the form 'spotify:track:...'
* Switch to config flow setup
* Add minimal test for config flow
* Add myself as codeowner and address some review concerns
* Address some further review comments
* Created a binary sensor and corrected some review comments.
* Updated the poolsense class and its interface to handle credentials better
* Moved the client session to the PoolSense class.
* Apply suggestions from code review
* Update binary_sensor.py
* Update homeassistant/components/poolsense/__init__.py
* Update sensor.py
* Update binary_sensor.py
* Removed unnecessary class variable
* Correcting a merge error.
Co-authored-by: Chris Talkington <chris@talkingtontech.com>
* Switch to integration level config
* Switch to per device config rather than per entity type
* All roller shutters should be added as covers
(there are non lighting types)
* Fixup tests that used invalid packets for platforms
* Avoid variable re-use
* Allow control events on sensors too
That way we get signal level sensors for these too
* Lint correction
* Don't filter sensors from config
Disable sensors from GUI if the entities are not wanted
* Correct usage of ATTR_ instead of CONF_
* Make sure the logging when a new entity is added includes the event
* Introduce Bond Hub concept
* Read Hub version information when setting up entry
* Link entities to Hub using via_device
* Add test to verify created Hub device properties
* Created a binary sensor and corrected some review comments.
* Updated the poolsense class and its interface to handle credentials better
* Moved the client session to the PoolSense class.
* Apply suggestions from code review
* Update binary_sensor.py
* Update homeassistant/components/poolsense/__init__.py
* Update sensor.py
* Update binary_sensor.py
Co-authored-by: Chris Talkington <chris@talkingtontech.com>
* Refactor Bond integration to remove duplication in Entity code and unit tests
* Refactor Bond integration to remove duplication in Entity code and unit tests (PR feedback)
* Support Fan domain in Bond integration
* Support Fan domain in Bond integration
* Support Fan domain in Bond integration (apply PR feedback)
* Support Fan domain in Bond integration (apply PR feedback)
* Use the shared zeroconf instance for homekit_controller
* bump version
* Update for upstream changes. Thank you @Jc2k !
* naming
* bump version
* empty commit to reset CI as re-run is not working
* Re-add remote file support for Slack
* More work
* Ensure Slack can only upload files from whitelisted directories
* Cleanup
* Finish work
* Code review
* Messing around
* Final cleanup
* Add comment explaining why we use aiohttp for remote files
* Typo
* Declare Bond covers as having assumed state, setup local polling for state updates
* Declare Bond covers as having assumed state, setup local polling for state updates (apply feedback from PR review)
* Declare Bond covers as having assumed state, setup local polling for state updates (apply feedback from PR review)
* Declare Bond covers as having assumed state, setup local polling for state updates (apply feedback from PR review)
* Update type_cameras.py
* Apply suggestions from code review
Support both 24kHz and 16kHz sample rate
Co-authored-by: J. Nick Koston <nick@koston.org>
* Adjust formatting
* Reformat
Co-authored-by: J. Nick Koston <nick@koston.org>
This way _handle_event can contain things available
when entity has been added to home assistant,
and _apply event can remain internal and used on init.
* Add public weather sensors back in
* Remove stale code
* Cleanup after before adding entities
* Fix pylint complaint
* Add test for options flow
* Change mode to listbox
* Update .coveragerc
* Address comments
* Don't process empty list
* Address comment
* Fix mistake
* Make signal unique
* Make string more unique
* Fix merge conflict
* First step of an EnOcean integration refactoring, including code reorganisation and support of a setup config flow
* Moved title to root of strings file
* Fixed pre-commit checks failures
* Fixed linter errors
* Updated formatted string format in logs
* Removed leftover comment
* Multiple changes after PR change requests.
Using an import flow for yaml config, removed unnecessary logs, added proper unload in __init__ and EnOceanDongle
Replaced config state machine by several flows.
Serial port validity check done in the EnOceanDongle class asynchronously, removed unique ID from config flow
Multiple cosmetic changes
* Multiple changes after PR change requests
* Added variable to store default value, as setdefault was caught returning None when the empty dict literal was passed as an argument
* Literal used directly
* Added tests for EnOcean config flows, changed static methods to bundle methods for bundle
* Updated variable name
* Added missing mock to test, replaced repeated magic strings by constants
* Changed imports to avoid an unused import warning from pylint on DOMAIN
* Adding pylint exception for unused import
* Added proper propagation of setup and unload to platforms, removed dead code, some syntax changes
* Removed setup_entry forwarding as the entities can only be configured using yaml
* Removed forwarding of unload
* Enabled code coverage for config flow only
* Clean up coveragerc
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* make ip check hostname aware
* add executor job for sync function doing IO and remove errant comma
* revert change to update new_data explicitly for options keys since it is already done later
* empty commit to retrigger CI
* Add support for set_config_parameter service
* Adjusted elif to if
* More if/else cleanup
* More if/else cleanup
* Less nesting
* End loop properly
* Added byte type
* Convert break to return
* fix presets and mode conversion
* fix mapping issues in ozw climate
* build mapping table in advance
* Copying a dict to a list copies the keys by default
* Switch what is used for device identifier
type_string can be changed if new device types are added based
on same driver.
* No need to slugify unique id
* Make devices and activities visibile as harmony attributes
* Allow restoring previous activity, add tests
* fix test
* Kill activity_notify with fire
* remove trailing ,
* Switch homekit to use async_track_state_change_event
Calling async_track_state_change_event directly
is faster than async_track_state_change and has
slightly lower latency triggering state updates
in homekit
* check for deleted entities
* Update additional tests for linked sensor removals
* Ensure removing entities does not result in an exception
* Cleanup async_track_state_change and augment docstrings.
Skip from_state and to_state matching in
async_track_state_change when they are None
Optimize the state change listener for the most
common use case: no to_state and from_state
matching.
* Update benchmark to be more realistic (previously we assumed only one entity was present in the whole instance)
* Add more tests to ensure behavior is preserved
* Ensure new behavior matches test
* remove MATCH_ALL from zone automation since its the default anyways
* Might as well use async_track_state_change_event instead since MATCH_ALL is removed
* Switch to dispatcher
* Adjust tests for dispatcher
* Store device in sensor
* Move state application into binary sensor entity class
* Move more specifics into per platform classes
* Should not apply event in init of sensor
* Switch to call_later
* Make apply_event public
* No point in slugifying debug logs
* Adjust error in off delay and event
* Make sure we match with masked id
* Migrate Guardian to use the DataUpdateCoordinator
* Finish work
* Cleanup
* Don't use UpdateFailed error
* Code cleanup
* Code cleanup
* Remove unnecessary change
* Code review
* Code review
* Use a subclass of DataUpdateCoordinator
* Make sure to pop client upon unload
* Adjust coverage
* Switch tests to use hass objects instead of direct
* Make sure sensor update state
* Add some initial binary sensor tests
* Add initial binary sensor tests
* Add tests for pt2262
* Add test for off delay
Calling async_track_state_change_event directly
is faster than async_track_state_change (see #37251) and has
slightly lower latency triggering state updates
* Convert Android TV integration to async
* pylint
* Remove unused test code
* Require async versions of androidtv and adb-shell
* Cleanup
* Remove commented out code
* Use constants SHELL_RESPONSE_OFF and SHELL_RESPONSE_STANDBY
* Prebake common history queries
The python overhead of to construct
the queries exceeded the database overhead. We now
prebake the queries that get frequently polled.
This reduces the time it takes to update history_stats
sensors and can make quite a difference if there
are a lot of them.
When using the mini-graph-card card, all the entities
on the card being graphed are queried every few seconds
for new states. Previously this would tie up the database if there
are lot of these graphs in the UI.
* Update homeassistant/components/history/__init__.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/history/__init__.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* cache entity_filter in the lambda
* switch to yield
* Revert "switch to yield"
This reverts commit f8386f4940.
* get_states always returns a list
* query wasnt actually reusable so revert part of the breakout
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Add NetdataAlarms alarm sensor to additionally collect alarm information from the netdata host
* Incorporate suggested changes by @MartinHjelmare
* Change from pictures to icons
* Simplify API callbacks following home-assistant-ecosystem/python-netdata/pull/5 and home-assistant-ecosystem/python-netdata/pull/6
* Bring back lost empty line
* Update the library version in manifest.json
* Update the library version in requirements_all.txt
* Linting
* Linting
* Fix typo
* Do not count cleared and undefined alarms as warnings
* Do not count cleared, undefined and uninitialized alarms as warnings
- Bumps bravia-tv lib to 1.0.6 which fixes is_connected() to actually
return True only when API is connected, instead of just returning whether
or not cookies are cached (regardless if they actually worked).
- Wrap is_connected() because it now performs io.
- Remove unnecessary logic to refresh cookies. Now that
is_connected() works, the bravia instance only needs to be
reconnected when is_connected is False and TV is not off.
The icon for Withings sleep sensor was using `mdi:bed` (which is correct for MDI v5.0.45 and later). However Home Assistant still uses an older version of Material Design Icons (4.9.95), so this `mdi:bed` icon was not displaying at all. It should be`mdi:hotel` instead, which you can see here: https://cdn.materialdesignicons.com/4.9.95/
* Support multiple MQTT availability topics
* Make availability list and availability_topic exclusive
* Make availability list and availability_topic exclusive
* Add missing abbreviation
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Tom Scholten <tom@sue.nl>
Co-authored-by: Tom <CoMPaTech@users.noreply.github.com>
* Improve unifi device tracker performance
The unifi websocket sends an update every second
which generates a significant amount of state
changed updates.
Avoid creating callback functions when they
are not going to be used.
* make _no_heartbeat/_make_disconnected instance methods
* remove extra empty line
* revert is_wired change
* remove extra line