* MQTT climate preset_modes rework
* Set deprection date to 2022.9 (6 months)
* add valid_preset_mode_configuration for discovery
* Update deprecation date
* Drop unused init method
* Add type hints to media_player tests
* Adjust test_init
* Adjust media_player
* Add type hints to conftest
* Use Mock in test_media_player
* Use lowercase in test_init
* Use relative import in diagnostics
* Add type hints to config_flow
* Adjust coveragerc
* Make gethostbyname autouse
* Cleanup gethostbyname and remote fixtures
* Drop unused fixtures
* Undo type hints and usefixtures on media_player
* Undo type hints and usefixtures in test_init
* Undo type hints in conftest
* Undo usefixtures in test_config_flow
* Format
Co-authored-by: epenet <epenet@users.noreply.github.com>
* Add binary_sensor to version integration
* Add test to check we not create for local
* Move _attr_icon to sensor
* Update homeassistant/components/version/binary_sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update nest to use stream thumbnail when it exists
* Update nest camera to always pull still image from stream
Update nest camera to always pull the still iamge from the stream component,
removing the use of the separate ffmpeg call, and removing use of the nest event
image. Image for events can now be pulled using the media source APIs, rather
than relying on the camera snapshot.
* Simplify a comment
* Remove more unused variables
* Simplify comments, image, and test code
* Remove assertions for placeholder images
* Address #63874
* avoid setting _last_period to None
* name is always set in discovery
* ValueError never happens only DecimalException
* async_tariff_change tracks state change - state machine will not pass a None
* test we only reset one utility_meter
* test corrupted restored state
* pretty sure _current_tariff doesn't change from init until here
* missing assert
* Revert "async_tariff_change tracks state change - state machine will not pass a None"
This reverts commit 24fc04a964.
* address review comment
* always a Decimal
* Remove entities when config entry is removed from device
* Update tests/helpers/test_entity_registry.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Don't remove entities not connected to a config entry
* Update homeassistant/helpers/entity_registry.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Improve stream robustness by always retrying in the worker on failure, rather than only when
keepalive is enabled.
This will make cloud cameras like nest more robust, since they have a tendency to be flaky. This
is also needed to improve client side retry behavior because when the client attempts to retry,
the stream token is already revoked because the worker stopped.
The worker will still idle timeout if no streams are present, so it won't go on forever if no
frontend is viewing the stream.
* Add re-auth handler for Picnic
* Extracted authentication part so right form/errors can be shown during re-auth flow
* Add tests for Picnic's re-authentication flow
* Simplify re-auth flow by using the same step as step_user
* Use user step also for re-auth flow instead of having an authenticate step
* Add check for when re-auth is done with different account
* Remove unnecessary else in Picnic config flow
* Fix the step id in the translation strings file
Publish Nest events with zone information if present. User defined zones are configured
in the Google Home app, and are published with Motion/Person event.
* Create MQTT discovery flow when manual config is present
* Change to integration_discovery flow
* Add test
* Add default handler for integration_discovery
* Add Moehlenhoff Alpha2 underfloor heating system integration
* isort changes
* flake8 changes
* Do not exclude config_flow.py
* pylint changes
* Add config_flow test
* correct requirements_test_all.txt
* more tests
* Update test description
* Test connection and catch TimeoutError in async_setup_entry
* Add version to manifest file
* Remove version from manifest file
* Replace tests.async_mock.patch by unittest.mock.patch
* Update moehlenhoff-alpha2 to version 1.0.1
* Update requirements for moehlenhoff-alpha2 1.0.1
* Update moehlenhoff-alpha2 to 1.0.2
* Use async_setup_platforms
* Use async_unload_platforms
* Separate connection and devices for each entry_id
* Use async_track_time_interval to schedule updates
* Check if input is valid before checking uniqueness
* Move Exception handling to validate_input
* Catch aiohttp.client_exceptions.ClientConnectorError
* Remove translation files
* Mock TimeoutError
* Fix data update
* Replace current callback implementation with ha dispatcher
* Return False in should_poll
* Remove unused argument
* Remove CONNECTION_CLASS
* Use _async_current_entries
* Call async_schedule_update_ha_state after data update
* Remove unneeded async_setup
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* Remove unneeded async_setup_platform
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* Set Schema attribute host required
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* Remove unused Exception class
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* Update manifest.json
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* pylint constructor return type None
* Replace properties by class variables
* use pass instead of return
* Remove unused sync update method
* remove property hvac_action
* remove pass
* rework exception handling
* Update homeassistant/components/moehlenhoff_alpha2/config_flow.py
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* Correct indentation
* catch Exception in validate_input
* Replace HomeAssistantType with HomeAssistant
* Update to moehlenhoff-alpha2 1.0.3
* Allow to switch between heating and cooling mode
* Update moehlenhoff-alpha2 to version 1.0.4
* Update heatarea data after setting target temperature
* Support hvac_action
* Fix heatarea update with multiple bases
* Update data after setting preset mode
* Use custom preset modes like defined by device
* Fix config flow test
* Fix test_duplicate_error
* Rename property to extra_state_attributes
Rename property device_state_attributes to extra_state_attributes and
return lowercase keys in dict.
* Refactor using DataUpdateCoordinator
* Remove _attr_should_poll
* Raise HomeAssistantError on communication error
Catch HTTPError instead of broad except and reraise as HomeAssistantError
* Change DataUpdateCoordinator name to alpha2_base
* Refresh coordinator before setting data
* Raise ValueError on invalid heat area mode
* Rename heatarea to heat_area
* Set type annotation in class attribute
* Move coordinator to top
* Move exception handling to the coordinator
* Use heat_area_id directly
* Sore get_cooling() result into local var
* Add explanation of status attributes
and remove BLOCK_HC
* Fix pylint warnings
* from __future__ import annotations
* Use Platform Enum
* Move data handling to coordinator
* Remove property extra_state_attributes
* Add missing annotations
* Update moehlenhoff-alpha2 to version 1.1.2
* Rework tests based on the scaffold template
* Set also heat/cool/day/night temp with target temp
* Remove unneeded code from tests
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* specify config type
* move coordinator outside try block
* rename gamename to game_name
* remove log in __init__
* Remove logging and minify update
* Add types to parameters
* Remove name from device
* Remove update listener
* Remove status icon
* Dont allow duplicate entries
* Use default translation string
* Remove online and port from coordinator
* Fix TOD component incorrectly determining the state between sunrise and sunset (#30199)
* TOD fix
* Comment added
* Review
* Review
* Review
* Update time after day fix workaround for compatibility with
current version.
Only apply fix when using times and not when using sun events.
Add unit test for behaviour.
Co-authored-by: Nikolay Vasilchuk <Anonym.tsk@gmail.com>
* Initial fivem integration setup
* Use licenseKey for unique ID
* Create FiveMServer class
* Create FiveMStatusBinarySensor
* Fix platform loading
* Create sensor platform
* Remove config flow tests
* Update manifest.json
* Use attr_ instead or properties in sensors.py
* Use entry_id as unique_id
* Move device info to _attr instead of property
* Register callback in FiveMEntity
* Create config flow tests
* Add loggin to fivem
* Use FiveM in config_flow
* Use update_coordinator instead of dispatcher
* Bump fivem-api to 0.1.2
* Remove leftovers
* More tests for config flow
* Add component files to .coveragerc
* Fix simple comments
* Add gamename check to config flow
* Use entity descriptions for sensors
* Move extra attributes to init
* Use [] instead of get() for server info
* Fix error in gamename test
* Add support for filter time left
* Fix test for fan platform
* Remove debug code
* Add unique id migration tool
* Convert to hours
* Fix tests
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add comment, check migration
* Refactor migration helper
* Refactor migration helper
* Move definition of new unique id
* Return after warning
* Add test for unique id migration
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Fix legacy nest diangostics to return gracefully, rather than a TypError
by checking explicitiy for SDM in the config entry. Update diagnostics
to use the common nest test fixture, and extend with support for the
legacy nest config. Use the sdm test fixture in the existing legacy
tests so they all share the same config files.
* Fix loss of ability to control white channel in HomeKit on RGB&W lights
- Fix white channel missing from RGB/W lights
- Fix temp missing from RGB/CW lights
- Fixes#65529
* cover the missing case
* bright fix
* force brightness notify on color mode change as well
As shown in #64868, a number of newer models don't come wiht a macAddr
attributes, so for those fall back to the wireless address.
This could be hidden by the python-songpal library but for now this will
make it possible to have multiple modern songpal devices on the same
network.
* Add support for picking discovered devices
- Also fixes state not being written initially (it was not so
obvious since the next coordinator update wrote it)
* store it
* store it
* order
* fixes
* more cleanups
* hints
* naming
* merge branches
* Improve test coverage prior to improving deCONZ binary sensor platform
* Define all relevant binary sensors as DeconzBinarySensorDescription
* Fix review comment
* Allow providing extra update keys if sensor provides extra attributes
* Minor touch up of naming
* Remove duplicate assert
* Add MQTT humidifier unknown state support
* Update homeassistant/components/mqtt/humidifier.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Fix tests for changed default optimistic state
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add Mqtt Fan unknown state support
* Update homeassistant/components/mqtt/fan.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Adjust default state in tests
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Mqtt switch allow unkown state
* correct type
* Update discovery tests
* Optimistic mode if not state_topic is configured.
* Default state UNKNOWN in optimistic mode
* fix discovery test
* Cleanup sensor expire triggers after reload
* fix test binary_sensor
* Also trigger cleanup parent classes
* Restore an expiring state after a reload
* correct discovery_update
* restore expiring state with remaining time
* Update homeassistant/components/mqtt/binary_sensor.py
description
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Log remaining time
* Move check
* check and tests reload
* remove self.async_write_ha_state()
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Improve google calendar test coverage to 97%
* Remove commented out code.
* Remove unnecessary (flaky) checks for token file persistence
* Remove mock code assertions
* Add debug logging to google calendar integration
* Increase alarm time to polling code to reduce flakes
* Setup every test in their own configuration directory
* Mock out filesystem calls to avoid disk dependencies
Update scope checking code to use Storage object rather than text file matching
* Update tests to check entity states when integration is loaded
* Mock out google service in multiple locations
* Update homeassistant/components/google/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/google/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add cast platform for extending Google Cast media_player
* Update tests
* Refactor according to review comments
* Add test for playing using a cast platform
* Apply suggestions from code review
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
* Pass cast type instead of a filter function when browsing
* Raise on invalid cast platform
* Test media browsing
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>