* Add service for getting a weather forecast
* Fix translations
* Improve service description
* Improve error handling
* Adjust typing
* Adjust typing
* Adjust service response format
* Add device tracker to subaru integration
* Fix timestamp in device tracker
* Add test for device tracker
* Incorporate PR review comments
* Apply suggestions from code review
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Incorporate code review comments
* Add tests for bad device tracker data
* Check device tracker data is available in entity
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Add OUI to tplink diagnostics
The main reason discovery does not work for new devices is we
are missing the OUI. Since we redact the whole mac address in
the diagnostics, this makes it difficult to fix. We now include
the OUI in the diagnostics
* fix: use cached mac
* fix: tests
* Fix turn_on ignoring transition=0 and brightness=None, add test
This fixes light.turn_on for ZHA lights ignoring a transition of 0 when no brightness is given at the same time.
It also adds a test for that case.
Fixes https://github.com/home-assistant/core/issues/93265
* Add test for "force on" lights
This test checks that "force on" lights also get an "on" command (in addition to the "move to level" command) when turn_on is called with only transition=0.
* Fix "on" command sent for transition=0 calls, fix FORCE_ON missing for transition=0
This fixes an issue where the "on" command is sent in addition to a "move_to_level_with_on_off" command, even though the latter one is enough (for non-FORCE_ON lights).
It also fixes the test to not expect the unnecessary "on" command (in addition to the expected "move_to_level_with_on_off" command).
The `brightness != 0` change is needed to fix an issue where FORCE_ON lights did not get the required "on" command (in addition to "move_to_level_with_on_off") if turn_on was called with only transition=0.
(It could have been `brightness not None`, but that would also send an "on" command if turn_on is called with brightness=0 which HA somewhat "supports". The brightness != 0 check avoids that issue.)
* Improve comments in ZHA light class
* add further sensors
* adjust and improve tests
* add device classes were applicable
* fix doc string
* name for ph comes from device class
* use icon from device class for ph sensor
* Bump hassil and intents package for HassShoppingListAddItem
* Remove hard-coded response text
* Test adding item to the shopping list
* Hook removed import in test for some reason
* Improve reading of MOTD, bump mcstatus to 10.0.3 and getmac to 0.9.4
* Revert bump of getmac
* Bump mcstatus to 11.0.0-rc3. Use new MOTD parser.
* Bump mcstatus to 11.0.0
* Set has_entity_name if device_name is set
* revert unneeded formatting change
* Add image platform
* Follow up comment
* Don't set `has_entity_name` without device name
* Only set has_entity_name if a valid name is set
* Follow device_class name and add tests
* Follow up comments add extra tests
* Move to helper - Log a warning
* fix test
* Allow to assign None as name explictly
* Refactor
* Log info messages when device name is not set
* Revert scene schema change - no device link
* Always set has_entity_name with device mapping
* Always set `_attr_has_entity_name`
* Cleanup
* Avoid using name in Subaru migrations
* Add feedback
* Update tests/components/subaru/test_sensor.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests/components/subaru/test_sensor.py
Co-authored-by: G-Two <7310260+G-Two@users.noreply.github.com>
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: G-Two <7310260+G-Two@users.noreply.github.com>
* Create an issue if push updates fail
* Improve strings
* Delete the issue when reloading configuration entry
* Change MAX_PUSH_UPDATE_FAILURES to 5
* Improve issue strings
* Add test
* Use for
* Update homeassistant/components/shelly/strings.json
Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>
* Simplify deleting the issue
---------
Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>
* Fully unload wemo config entity
* Test reloading the config entry
* Encapsulate data with dataclasses
* Fix missing test coverage
* Replace if with assert for options that are always set
* Move WemoData/WemoConfigEntryData to models.py
* Use _ to indicate unused argument
* Test that the entry and entity work after reloading
* Nit: Slight test reordering
* Reset the correct mock (get_state)
* from .const import DOMAIN
* Nit: _async_wemo_data -> async_wemo_data; not module private
* 2023.7.16
- Fix bug with values defaulting to "n/a" in stead of None
* 2023.7.16
- Set device class and state classes on entities
* 2023.7.16
- Set StateClass and DeviceClass directly on the entitiy
* 2023.7.16
- Fix black and ruff issues
* 2023.7.17
- Update logic catering for the 'n/a' response on an API failure
- Add testcase
* - Fix bug in formatting
* 2023.7.17
- Refacotr to consider the "n/a" response returned from the Python lib
on an error or faliure
- Remove setting of StateClass and DeviceClass as requested
- Add "n/a" test case
* 2023.7.17
- Remove unused imports
* 2023.7.18
- Apply review requested changes
* - Additional review change resolved
* Add State and Device class attributes
* Allow matching custom quirks when self.quirk_classes might not contain the full class path but only the module and the class.
* Add test for matching custom quirk classes.
* 2023.7.16
- Fix bug with values defaulting to "n/a" in stead of None
* 2023.7.16
- Set device class and state classes on entities
* 2023.7.16
- Set StateClass and DeviceClass directly on the entitiy
* 2023.7.16
- Fix black and ruff issues
* 2023.7.17
- Update logic catering for the 'n/a' response on an API failure
- Add testcase
* - Fix bug in formatting
* 2023.7.17
- Refacotr to consider the "n/a" response returned from the Python lib
on an error or faliure
- Remove setting of StateClass and DeviceClass as requested
- Add "n/a" test case
* 2023.7.17
- Remove unused imports
* 2023.7.18
- Apply review requested changes
* - Additional review change resolved
* String review: rename 'life' to 'lifetime'
- The term life, such as in 'filter life' can be ambiguous.
- Renamed to 'lifetime', as quite a few integrations use the term 'lifetime' to express this concept
- Improves consistency and should be easier to understand.
* HomeKit: adapt test case to reflect string change
* Fix test case failure caused by string rename: first step
* Alexa temperature adjustment handle multiple setpoint
In "auto" mode with many thermostats, the thermostats expose both an
upper and lower setpoint representing a range of temperatures. When a
temperature delta is sent from Alexa (e.g. "lower by 2 degrees), we need
to handle the case where the temperature property is not set, but
instead the upper and lower setpoint properties are set. In this case,
we adjust those properties via service call instead of the singular
value.
* Updating tests to fix coverage
* Significantly speed up single entity/response service calls
Since the majority of service calls are single entity, we can
avoid creating tasks in this case. Since the multi-entity
service calls always check the result and raise, we can switch
the asyncio.wait to asyncio.gather
* Significantly speed up single entity/response service calls
Since the majority of service calls are single entity, we can
avoid creating tasks in this case. Since the multi-entity
service calls always check the result and raise, we can switch
the asyncio.wait to asyncio.gather
* revert
* cannot be inside pytest.raises
* one more
* Update homeassistant/helpers/service.py
* Airvisual Pro Outside Station Support
* pr feedback
* formatting, language
* Update homeassistant/components/airvisual_pro/strings.json
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* fix assertion on airvisual test
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Migrate google assistant to has entity name
* Fix tests
* Add device name
* Update homeassistant/components/google_assistant/button.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
---------
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Add feature to enforce polling an IMAP server
* Add test
* Remove not needed string tweak
* Rename enforce_polling to enable_push
* Push enabled by default
* Differentiate between device info types
* Update allowed fields
* Update homeassistant/helpers/entity_platform.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Split up message in 2 lines
* Use dict for device info types
* Extract device info function and test error checking
* Simplify parsing device info
* move checks around
* Simplify more
* Move error checking around
* Fix order
* fallback config entry title to domain
* Remove fallback for name to config entry domain
* Ensure mocked configuration URLs are strings
* one more test case
* Apply suggestions from code review
Co-authored-by: Erik Montnemery <erik@montnemery.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add deprecated_yaml issue to the homeassistant integration
* Update test
* Update homeassistant/components/homeassistant/strings.json
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Include DOMAIN in issue_id
* Update test
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Add device_class and state_class in config flow for SQL
* Update when selected NONE_SENTINEL
* Add tests
* Use SensorDeviceClass and SensorStateClass in tests
* Add volatile_organic_compounds_parts in strings selector
* Add test_attributes_from_entry_config
* Remove test_attributes_from_entry_config and complement test_device_state_class
* Add test_attributes_from_entry_config in test_sensor.py
* Move ESPHomeManager into its own file
This is not a functional change. This is only a reorganization
ahead of some more test coverage being added so moving tests
around can be avoided later.
* relos
* fixes
* merge a portion of new cover since its small and allows us to remove the __init__ from .coveragerc
These were likely used as an example when writing the tests for this
component and we missed renaming them.
A few unused vars with references to GMail were also removed.
* Add humidity to NWS forecast to address https://github.com/home-assistant/core/issues/95572
* Use pynws 1.5.0 enhancements for probabilityOfPrecipitation, dewpoint, and relativeHumidity.
* Update requirements to match pynws version
* test for clear night
* update docstring
---------
Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>
* Add more device info for SmartThings devices
* Fix binary_sensor test
* Fix binary sensor test, try 2
* Fix and add SmartsThings new device info tests
* zwave_js: deprecate Dry and Fan preset modes
Migrating Dry and Fan presets to HVAC modes
* Move consts. Set Dry and Fan as HVAC-first modes.
* Update homeassistant/components/zwave_js/climate.py
Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
* Fix tests
* Keep track of HA release when deprecation was introduced
---------
Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
* Warn when changing multipan channel if there are not 2 known users
* Add test
* Improve messages
* Tweak translation string
* Adjust message
* Remove unused translation placeholders
* Add Matter Climate support
* update set target temp and update callback
* remove print
* remove optional property
* Adjust the code to improve readability.
* add thermostat test
* Remove irrelevant cases in setting the target temperature.
* add temp range support
* update hvac action
* support adjust low high setpoint..
* support set hvac mode
* address some review feedback
* move some methods around
* dont discover climate in switch platform
* set some default values
* fix some of the tests
* fix some typos
* Update thermostat.json
* Update homeassistant/components/matter/climate.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/matter/climate.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* support heat_cool in hvac_modes
* address some review feedback
* handle hvac mode param in set temp service
* check hvac modes by featuremap
* add comment to thermostat feature class
* make ruff happy..
* use enum to enhance readability.
* use builtin feature bitmap
* fix target temp range and address some feedback
* use instance attribute instead of class attr
* make ruff happy...
* address feedback about single case
* add init docstring
* more test
* fix typo in tests
* make ruff happy
* fix hvac modes test
* test case for update callback
* remove optional check
* more tests
* more tests
* update all attributes in the update callback
* Update climate.py
* fix missing test
---------
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
If the yaml file has invalid utf-8, the config flow would raise an
unhandled exception. Allow the encryption key to be entered manually
in this case instead of a hard failure
fixes#92772
* Fix source device when source entity is changed
* Update loop
* Complement and add comments in the test_change_device_source test
* Only clean up dev reg when options change
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Avoid regex for negative zero check in sensor
We can avoid calling the regex for every sensor value
since most of the time values are not negative zero
* tweak
* tweak
* Apply suggestions from code review
* simpler
* cover
* safer and still fast
* safer and still fast
* prep for py3.11
* fix check
* add missing cover
* more coverage
* coverage
* coverage
Remove generated translation
Raise error correctly
Remove obsolete consts
Remove callback, hass assignment and info log
Use name from LOQED API instead of default name
Correct entity name for assertion
* Create Opower integration
* fix tests
* Update config_flow.py
* Update coordinator.py
* Update sensor.py
* Update sensor.py
* Update coordinator.py
* Bump opower==0.0.4
* Ignore errors for "recent" PGE accounts
* Add type for forecasts
* Bump opower to 0.0.5
* Bump opower to 0.0.6
* Bump opower to 0.0.7
* Update requirements_all.txt
* Update requirements_test_all.txt
* Update coordinator
Fix exception caused by https://github.com/home-assistant/core/pull/92095
{} is dict but the function expects a set so change it to set()
* Improve exceptions handling
* Bump opower==0.0.9
* Bump opower to 0.0.10
* Bump opower to 0.0.11
* fix issue when integration hasn't run for 30 days
use last stat time instead of now when fetching recent usage/cost
* Allow username to be changed in reauth
* Don't allow changing username in reauth flow
* Handle incorrect or missing device name for ESPHome noise encryption
If we did not have the device name during setup we could never
get the key from the dashboard. The device will send us
its name if we try encryption which allows us to find the
right key from the dashboard.
This should help get users unstuck when they change the key
and cannot get the device back online after deleting and
trying to set it up again manually
* bump lib to get name
* tweak
* reduce number of connections
* less connections when we know we will fail
* coverage shows it works but it does not
* add more coverage
* fix test
* bump again
* Ensure trigger sentences do not contain punctuation
* Update homeassistant/components/conversation/trigger.py
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Limit fields returned for the list events service
* Update websocket tests and fix bugs in response fields
* Omit 'None' fields in the list events response
* Return targets with debug sentence API
* Update test
* Update homeassistant/components/conversation/__init__.py
* Include area/domain in test sentences
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* added update entity for Linn devices
* Update homeassistant/components/openhome/update.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* use parent methods for version attributes
* fixed issue with mocking openhome device
* Update homeassistant/components/openhome/update.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* update entity name in tests
---------
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Remove Hyperion Priority Light
* Remove coupling between light entity and led device
* Merge HyperionLight and HyperionBaseLight as we will only have one light entity
* Set state based on whether priority channel is open or not
* Remove leftover variable from Priority Light
* Remove external sources from light entity; use switch entities instead
* Remove external effects from effects to show dropdown
* Remove workaround for hyperion.ng issue 992
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add HumidifierAction StrEnum
* Add action attribute to HumidifierEntity
* Update strings.json
* Add action to demo humidifier
* Add tests
* Fix imports
* Add 'off' humidifier action
* Set action to 'off' when state is 'off'
* Add 'off' action to strings.json
* Test that action sets to "off" when state is "off"
* Use is_on instead of state
* Fix typo
* black