Fixes
```
recorder/test_init.py:251: SAWarning: SELECT statement has a cartesian product between FROM element(s) "states" and FROM element "state_attributes". Apply join condition(s) between each element to resolve.
```
* Ensure humidity is still exported to HomeKit when is cannot be set
We would only send humidity to HomeKit if the device supported
changing the humidity
* remove unrelated changes
* Refactor async_match_states
* Check entity name after state, before aliases
* Give entity name matches priority over area names
* Don't force result to have area
* Add area alias in tests
* Move name/area list creation back
* Clean up PR
* More clean up
* Bump aiohue to 4.6.0
* fix device name for lights
* fix name for groups too
* ignore smart scenes
* bump to 4.6.1 instead
* Add support for Smart Scenes (Natural lights) in Hue
* update base entity class
* fix test fixture
* update tests
* fix scene test
* fix typo
* use underlying scene controller
* use enum value
* update tests
* add current scene name within smart scene
* extra attributes are only valid if the scene is active
* Update v2_resources.json
* typo
* fix after merge
* ESPHome handle remove password and no encryption
* Start reauth for invalid api password
---------
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* Fix MQTT discovery failing after bad config update
* Update last discovery payload after update success
* Improve test, correct update assignment
* send_discovery_done to finally-catch vol.Error
* Just use try..finally
* Remove extra line
* use elif to avoid log confusion
* Update climate_sdm.py
* Update test case to detect KeyError
* Throw a defined exception if the condition in encoutered
Include keys from device_traits in error message
* Less diagnostic information in error message
* Added multiple features to OpenAI integration
* Fixed failed test
* Removed features and improved tests
* initiated component before starting options flow
* Speed up comparing State and Event objects
Use default python implementation for State and Event __hash__ and __eq__
The default implementation compared based on the id() of the object
which is effectively what we want here anyways. These overrides are
left over from the days when these used to be attrs objects
By avoiding implementing these ourselves all of the equality checks
can happen in native code
* tweak
* adjust tests
* write out some more
* fix test to not compare objects
* more test fixes
* more test fixes
* correct stats tests
* fix more tests
* fix more tests
* update sensor recorder tests
* Cache the names and area lists in the default agent
fixes#86803
* add coverage to make sure the entity cache busts
* add areas test
* cover the last line
* Nest - Climate - Error Messages
1. Error messages were incorrect for some methods, for example async_set_temperature was reporting failure to set hvac_mode. This is corrected.
2. Error messages were incomplete and were not including the entity_id,and the operation being performed that failed.
3. Add unit tests to test the exception handling
* Move tests into exiisting error test
* Improve readability of error message
* Add Mega joule
* Reorder valid energy types
Alphabetical
* Add Mega Joule
* Add Mega Joule as valid energy unit
* Add Mega Joule
* Add Mega Joule as a Unit of Measurement to Energy
* Update tests
* Update tests
* Update number docstring
Co-authored-by: Roving Ronin <108674933+Roving-Ronin@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Migrate totalconnect to use async_forward_entry_setups
Replaces deprecated async_setup_platforms with async_forward_entry_setups
* fix double update and tests
* Migrate homematicip_cloud to use async_forward_entry_setups
Replaces deprecated async_setup_platforms with async_forward_entry_setups
* adapt test, this test should be rewritten
* Allow customizing sensor precision
* Don't convert integer strings to floats
* Tweak converting sensor state to number
* Drop default rounding to 2 decimals
* Adjust test
* Tweak rounding, improve test coverage
* Don't convert to a number if not necessary
* Raise if native_precision is set and state is not numeric
* Address review comments
* Address comments, simplify
* Don't call property twice
* Make exception more helpful
* Migrate steam_online to use async_forward_entry_setups
Replaces deprecated async_setup_platforms with async_forward_entry_setups
* fix steam_online tests
* Allow multiple commands in the same conversation
* fix test
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Add missing cv import
* Update service description
* Fix test after merging dev
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Add media browsing and play media support in Bravia TV
* Add fix invalid Bravia Content-Type header for icons
* Avoid duplicates in source_list
* Small cleanup
* Edit comment
* Revert en.json
* Use intent responses from home_assistant_intents
* Use error responses from home_assistant_intents
* Remove speech checks for intent tests (set by conversation now)
* Bump hassil and home-assistant-intents versions
* Use Home Assistant JSON reader when loading intents
* Remove speech checks for light tests (done in agent)
* Add more tests for code coverage
* Add test for reloading on new component
* Add test for non-default response
* Add options and execute_if_off_supported properties to Color channel
* Initialize "options" attribute on Color channel (allowing cache)
* Implement execute_if_off_supported for ZHA lights
* Make sure that color_channel exists, before checking execute_if_off_supported
* Replace "color_channel is not None" check with simplified "if color_channel"
* Make "test_number" test expect "options" for init attribute
* Add test_on_with_off_color test to test old and new behavior
* Experimental code to also support "execute_if_off" for groups if all members support it
* Remove support for groups for now
Group support will likely be added in a separate PR. For now, the old/standard behavior is used for groups.
* Add validation for lock integration
* Add LockEntityFeature.OPEN for lock group
* Correct tests google_assistant for extra entity
* Validate feature when registering service
* Update tests
* Add LockFeature.OPEN with group
* Add support for streaming (push) history
Currently we poll for history data, like logbook we can stream
this data to avoid database overhead
* Update homeassistant/components/history/__init__.py
* merge filter
* expose new api
* expose new api
* expose new api
* expose new api
* coverage
* tests
* fixes
* tweak
* tweak
* tweak
* DRY
* leaky
* test for specific entities
* test for specific entities
* test for specific entities
* test for specific entities
* test for specific entities
* cover
* cover
* more cover
* tweak
* make sure it works before history starts
* fix test
* cover
* tweak
* make sure we unsub on overflow
* Update homeassistant/components/history/__init__.py
* Update homeassistant/components/history/__init__.py
* fix race in test
* fix db executor access
* relo above task creation
* Don't interpret negative verbosity as debug
CI run with -qq which is a negative verbosity
* Make sure all caplog tests get debug level
* Update tests/conftest.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add jammed state support for MQTT lock
* Correct payload jammed key
* Add tests - rename solved to ok
* Rename jammed state and template topics to motor
* Use state topic for handling motor state
* Follow up comments
* Change default behaviour `state_unjammed`
* Skip `state_unjammed`
* Move entity/area resolution to async_match_states
* Special case for covers in HassTurnOn/Off
* Enable light color/brightness on areas
* Remove async_register from default agent
* Remove CONFIG_SCHEMA from conversation component
* Fix intent tests
* Fix light test
* Move entity/area resolution to async_match_states
* Special case for covers in HassTurnOn/Off
* Enable light color/brightness on areas
* Remove async_register from default agent
* Remove CONFIG_SCHEMA from conversation component
* Fix intent tests
* Fix light test
* Fix humidifier intent handlers
* Remove DATA_CONFIG for conversation
* Copy ServiceIntentHandler code to light
* Add proper errors to humidifier intent handlers
* Add preload and reload service calls to conversation
* Add conversation preload/reload to websocket API
* Merge prepare into reload
* reload service and prepare websocket API
* Add preload and reload service calls to conversation
* Add conversation preload/reload to websocket API
* Merge prepare into reload
* reload service and prepare websocket API
* Add language lock for loading intents
* Add more tests for code coverage
* adjust device registry
* ignore test unique id
* update test
* ditch uniqueid + prefix serial
* adjust test
* add tests
* fix switch test
* prefix all identifiers
* Update homeassistant/components/matter/adapter.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* no underscore in id
* fix test
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Only wait for import flows to initialize at setup
* Update hassio tests
* Update hassio tests
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Force live logbook to send an empty message to indicate no results
Since the sync task can take a while if the recorder is
busy, the logbook will appear to hang if we do not send
the first partial message even if its empty.
This work is in preparation for a higher database
commit interval where this issue is most obvious.
The historical only path did not have this issue because
it never had to wait for the db sync.
* update tests