* 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
* bae entity unique id on Operational Instance Name standard
* Update homeassistant/components/matter/entity.py
Co-authored-by: Stefan Agner <stefan@agner.ch>
* also adjust unique id for devices
* final adjustment
* remove assert on server_info
* move device info to init
* fabric_id_hex
* use DeviceInfo instead of dict
* fix test
Co-authored-by: Stefan Agner <stefan@agner.ch>
* Add Thread integration
* Add get/set operational dataset as TLVS
* Add create operational dataset
* Add set thread state
* Adjust after rebase
* Improve HTTP status handling
* Improve test coverage
* Change domains from thread to otbr
* Setup otbr from a config entry
* Add files
* Store URL in config entry data
* Make sure manifest is not sorted
* Remove useless async
* Call the JSON parser more
* Don't raise exceptions without messages
* Remove stuff which will be needed in the future
* Remove more future stuff
* Use API library
* Bump library to 1.0.1
* Initial "group members assume state" implementation for ZHA
* Remove left-over debug flag (where polling was disabled)
* Implement _send_member_assume_state_event() method and also use after turn_off
* Only assume updated arguments from service call to group
* Make code more readable and change checks slightly
* Move "send member assume state" events to LightGroup on/off calls
* Include new config option in tests
* Check that member is available before updating to assumed state
* Lower "update group from child delay" for debouncer to basically 0 when using assumed member state
* Allow "child to group" updates regardless of config option
This is not needed, as group members will not update their state, as long as they're transitioning. (If a group transitions, it also sets its members to transitioning mode)
This fixes multiple issues. Previously, the state of a group was completely wrong when:
- turn on group with 10 second transition
- turn on members individually
- turn off members individually
- group state would not update correctly
* Move "default update group from child delay" constant
* Change to new constant name in test
* Also update fan test to new constant name
* Decrease "update group from child delay" to 10ms
In my testing, 0.0 also works without any issues and correctly de-bounces child updates when using the "assume state option".
This is just for avoiding multiple state changes when changing the group -> children issue individual updates.
With 2 children in a group and delay 0, both child updates only cause one group re-calculation and state change.
0.01 (10ms) should be plenty for very slow systems to de-bounce the update (and in the worst case, it'll cause just another state change but nothing breaks)
* Also implement "assuming state" for effect
Not sure if anybody even uses this, but this one is a bit special because the effect is always deactivated if it's not provided in the light.turn_on call.
* Move shortened delay for "assuming members" to a constant
* Add basic test to verify that group members assume on/off state
* Move _assume_group_state function declaration out of async_added_to_hass
* Fix rare edge-case when rapidly toggling lights and light groups at the same time
This prevents an issue where either the group transition would unset the transition flag or the single light would unset the group transition status midst-transition.
Note: When a new individual transition is started, we want to unset the group flag, as we actually cancel that transition.
* Check that effect list exists, add return type
* Re-trigger CI due to timeout
* Increase ASSUME_UPDATE_GROUP_FROM_CHILD_DELAY slightly
The debouncer is used when updating group member states either by assuming them (in which case we want to barely have any delay), or between the time we get the results back from polling (where we want a slightly longer time).
As it's not easily possible to distinguish if a group member was updated via assuming the state of the group or by the polling that follows, 50 ms seems to be a good middle point.
* Add debug print for when updating group state
* Fix issues with "off brightness" when switching between group/members
This fixes a bunch of issues with "off brightness" and passes it down to the members correctly.
For example, if a light group is turned off with a transition (so bulbs get their level set to 1), this will also set the "off brightness" of all individual bulbs to the last level that they were at.
(It really fixes a lot of issues when using the "member assume group state" option. It's not really possible to fix them without that.)
Furthermore, issues where polling was previously needed to get the correct state after "playing with transitions", should now get be resolved and get correct state when using the "members assume group state" option.
Note: The only case which still can't be fixed is the following:
If individual lights have off_with_transition set, but not the group, and the group is then turned on without a level, individual lights might fall back to brightness level 1 (<- at least now shows correctly in UI even before polling).
Since all lights might need different brightness levels to be turned on, we can't use one group call. But making individual calls when turning on a ZHA group would cause a lot of traffic and thereby be counter-productive.
In this case, light.turn_on should just be called with a level (or individual calls to the lights should be made).
Another thing that was changed is to reset off_with_transition/off_brightness for a LightGroup when a member is turned on (even if the LightGroup wasn't turned on using its turn_on method).
off_with_transition/off_brightness for individual bulbs is now also turned off when a light is detected to be on during polling.
Lastly, the waiting for polled attributes could previously cause "invalid state" to be set (so mid-transition levels).
This could happen when group and members are repeatedly toggled at similar times. These "invalid states" could cause wrong "off brightness" levels if transitions are also used.
To fix this, we check after waiting for the polled attributes in async_get_state to see if a transition has started in the meanwhile. If so, the values can be discarded. A new poll will happen later and if using the "members assume group state" config option, the values should already be correct before the polling.
* Enable "group members assume state" config option by default
The config tests are also updated to expect the config option be enabled by default.
For all tests, the config option is generally disabled though:
There are only two group related tests. The one that tests this new feature overrides the config option to be enabled anyway.
The other tests works in a similar way but also "sends" attribute reports, so we want to disable the feature for that test.
(It would also run with it enabled (if the correct CHILD_UPDATE value is patched), but then it would test the same stuff as the other test, hence we're disabling the config option for that test.)
* Add tier summation delivered for zlinky
* Improve name case
* Add other tiers and register tier
* Fix smartenergy sensor update
* Account for new reporting configuration in unit tests
* Use cluster ID attributes instead of hardcoding the values
* Use tier names instead of the numeric constants for formatter
* Revert active register tier delivered
* Fix tests
Co-authored-by: puddly <32534428+puddly@users.noreply.github.com>
* Update Kostal integration to use maintained lib
* Update Kostal integration to use pykoplenti
* Update kostal_plenticore tests for new lib
* Fix tests config_flow & diagnostics after changes
* Make the kitchen_sink integration set up a config entry
* Update homeassistant/components/kitchen_sink/config_flow.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Add singleton check in import step + add test
* Fix tests
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Remove sky connect config entry if USB stick is not plugged in
* Tweak cleanup
* Give some stuff more cromulent names
* Do the needful
* Add tests
* Tweak
* Implement locking, unlocking and jammed on MQTT lock
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
* Add tests
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
* Refactor condition
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
* Parametrize tests
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
* Manage only locking and unlocking
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
* Remove jammed from abbreviations
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
* set valid states in self._valid_states
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
* Revert Axis config flow version to 1
* Set up using hass.config_entries.async_setup
* Fix review comment
* Update homeassistant/components/axis/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* 🎨 Add missing typing for config-flow
* 🐛 Remove 'tariff' edition from options-flow
The `entry.data["tariff"]` is what makes the `entry.unique_id`,
so it's an incoherence to be able to change it in the Options flow
* 🌐 Update generated EN translation
* 🎨 Link translations of option-flow to those of config-flow
* Deprecate mode_command_topic for MQTT climate
* Correct deprecation and remove support release inf
* Do not use future tense for comment
* Extend deprecation period to 6 months
* Probe Huawei LTE API for device support on SSDP match
More or less as expected, the loosening of SSDP/UPnP data matches done
in #81643 started to yield false positives, as in #85402.
Coming up with robust matches solely based on the SSDP/UPnP data still
does not seem possible, so keep the matches as loose as they were made,
but additionally invoke a probe request on the API to determine if the
device looks like a supported one.
* Probe only after unique id checks
Prevents throwaway probes for discoveries already in progress.
* Fix SSDP result URL test, add missing assert on it
* 🔥 Remove old config entry migration logic
introduced for a breaking change in 2021-06, now unreachable after
completely disabling the YAML config for the integration
* ✅ Remove test for old config entry migration logic
and adjust existent one for config-flow to do not lose coverage
* 📦️ Bump aiopvpc version
* ♻️ Evolve DataUpdateCoordinator and PVPC sensor for new aiopvpc
setting `SensorDeviceClass.MONETARY` for the price sensor
* 🍱 tests: Update tests fixtures with new sensor data
for aiopvpc v4 with 'esios_public' as data-source
* ✅ tests: Adapt test suite for new default data-source
* 📦️ Bump aiopvpc version for latest patch 4.0.1
* ⏪️ Revert changes unrelated to library bump
* ⏪️ Revert tests changes unrelated to library bump
* Add diagnostics to bmw_connected_drive
* Add tests for diagnostics
* Move get_fingerprints to library, bump bimmer_connected to 0.10.4
* Update bimmer_connected to 0.11.0
* Fix pytest
* Mock actual diagnostics HTTP calls
* Update tests for bimmer_connected 0.12.0
* Don't raise errors if vehicle is not found
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
* 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
* fix test fixture
* update tests
* fix scene test
* Rainbird config flow
Convert rainbird to a config flow. Still need to handle irrigation numbers.
* Add options for irrigation time and deprecate yaml
* Combine exception handling paths to get 100% test coverage
* Bump the rainird config deprecation release
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Remove unnecessary sensor/binary sensor and address some PR feedback
* Simplify configuration flow and options based on PR feedback
* Consolidate data update coordinators to simplify overall integration
* Fix type error on python3.9
* Handle yaml name import
* Fix naming import post serialization
* Parallelize requests to the device
* Complete conversion to entity service
* Update homeassistant/components/rainbird/switch.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/rainbird/config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Remove unused import
* Set default duration in options used in tests
* Add separate devices for each sprinkler zone and update service to use config entry
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* add reauth flow
* adjust tests
* use constant for platforms
* remove not needed async_get_entry()
* fix typo
* user _async_abort_entries_match()
* don't use CONF_ prefix for config dicts
* sort PLATFORMS
* use entry_data in reauth flow
* redo Add sensor
* move back to ClientError
simplify washer_state
* Cleanup Sensor definitions
* Seperated EndTimeSensor
* Clean up WasherDryerTimeClass
* Start with Timestamp = None
* Clean up class description
* One more ClientError
* change to restore sensor
* Don't update when no state change
* Seperate washer tests
Add restore_state test
* Remove unused loop in washer sensor test
* No loops in sensor tests
* Remove unnecessary SensorTestInstance
* Add support for WetDry and WindHeading fields in LaCrosse View
* Improve test coverage
* Verify data type before conversion
* Improve test coverage
* Convert to more concise type conversion
* Add Flex field as per #79529
* Improve code quality
* Add check if expected field is missing
* MQTT Climate: Add support for setting the current humidity via MQTT
* MQTT Climate: Add configuration constants related to setting the target humidity
* MQTT Climate: Add support for setting the humidity's state topic & template
* MQTT Climate: Add support for setting the initial humidity
* MQTT Climate: Add support for setting the humidity's command topic & template
* MQTT Climate: Add support for setting the min/max humidity
* MQTT Climate: Fix style & tests
* MQTT Climate: Set the initial humidity to None
* MQTT Climate: Rename _set_mqtt_attribute to _set_climate_attribute and handle_temperature_received to handle_climate_attribute_received
* MQTT Climate: Copy humidity range validation from MQTT Humidifier
* MQTT Climate: Remove CONF_HUMIDITY_INITIAL
* MQTT Climate: Only enable support for TARGET_HUMIDITY when the command topic is set
* MQTT Climate: Check if setting the target humidity is supported before actually setting it
* MQTT Climate: Make sure that CONF_HUMIDITY_COMMAND_TOPIC has been configured when setting CONF_HUMIDITY_STATE_TOPIC
* MQTT Climate: Fix broken tests
* MQTT Climate: Add test for optimistically setting the target humidity
* MQTT Climate: Remove references to "temperature" in handle_climate_attribute_received
* MQTT Climate: Add additional humidity-related tests
* MQTT Climate: Remove supported feature check in handle_target_humidity_received
It's not needed because this is covered by the `valid_humidity_state_configuration` validation.
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
* MQTT Climate: Remove supported feature check in async_set_humidity
It is covered by the base Climate entity.
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
* Add filter and error code support to CoolMastetNet
* Create separate entities
* coolmaster swing_mode support
* Changed default to False
* Raise HomeAssistantError
* Add tests for init and climate
* Fixed bad merge
* Catch only ValueError
* Add filter and error code support to CoolMastetNet
* Create separate entities
* Remove async_add_entities_for_platform
* Fixed call to async_add_entities
* Avoid using test global
* Add support for fututre config entry migrations
* Add testcase
* dir check bug
* rework the migrate testcase
* implement comments
* Missed this part of the file
* Fix and clean tests
* add more into the testcase
* push sugestions
* Upgrade velbusaio to add version 2 support
* more comments
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Ensure AirVisual Pro migration includes device and entity customizations
* Update homeassistant/components/airvisual/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Code review
* Fix tests
* Fix tests FOR REAL
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Support US region in the Whirlpool integration
* Force maytag brand for US region
* Add missing util.py file
* Fix import after merge
* run black
* Missing region key in config flow test
* Fixed Generic config entry
* fixed typos in dict
* Remove redundant list const
Co-authored-by: mkmer <mike.j.kasper@gmail.com>