* Adding option for setpoint override mode
Temporary setpoint override mode can now be set on or off. 'Constant' setpoint override mode will be used when Temporary is set to off
* Changes after review comment
Added default value for the setpoint override mode
* Add zwave_js.bulk_set_partial_config_parameters service
* update to handle command status
* add test for awake node
* test using a device in service call
* Bump zwave-js-server-python to 0.23.0 and update integration to support schema changes
* refactor notification evenets a bit
* fix tests and bug fixes
* additional changes due to new PR
* add command class and command name
* use new event names so we can retain event property names
* handle command status being returned from async_set_config_parameter
* bump dependency version
* adjust log message to be consistent
* disable pylint warning
* Update homeassistant/components/zwave_js/services.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* add test for awake node
* switch async_get_registry to async_get
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
config_entries.async_setup will skip ignored and disabled integrations
but bootstrap would still load them in memory even though they would
never be setup.
If we pass a string to ConfigEntryNotReady or raise it from
another exception we now log the string passed or the
string generated by the original exception.
With #47201 this makes it easy for developers to still show
the reason why setup failed without having to worry about log
spam from additional attempts by rasing ConfigEntryNotReady
from the original exception.
* Fix template fan default speed count
The default speed count was defaulting to 3 when percentage
was implemented instead of the documented value of 100
* Increase coverage
* remove unreachable code
Some routers will lowercase all the hostnames. Since we
already lowercase hostnames for matching purposes, we now
pass the lowercased hostname to the integration.
Currently only roomba cared about this, and has been adjusted.
* Simplify maxcube integration
Device objects returned by maxcube-api dependency are stable, so
we do not need to resolve from the device address every time.
Also, refactor and unify how maxcube integration sets temperature & mode.
* Raise ValueError if missing parameters for set_temperature method
Raise a ValueError exception If set_temperature does not receive
a temperature parameter.
Also, document properly _set_target method.
* Use Type | None instead of Optional[Type] annotation
* Protect set_hvac_mode and set_preset_mode from unsupported parameters
* Change modbus configuration to new style.
The old (frozen) configuration is still supported, but when detected a big
warning is issued that it will soon be removed. This allows users to change
their configuration at their pace.
Clean configuration SCHEMAs and move common modbus parts
to MODBUS_SCHEMA (renamed from BASE_SCHEMA).
Add BASE_COMPONENT_SCHEMA to ensure common configuration of components.
All component define e.g. NAME, move these to a common schema.
change components (binary_sensor, sensor, switch) to new config
Add test set for modbus itself (old config and discovery_info).
Add test of devices discovery_info configuration
* Update discovery_info configuration for binary_sensor.
* Update discovery_info configuration for sensor.
* Update discovery_info configuration for switch.
* Review comments.
* update due to change in core
* flake8 problem.
* Correct log message.
* add should_poll property.
* Fix polling for Modbus binary sensor
* Fix polling for Modbus sensor
* Fix polling for Modbus switch
* Fix switch.
* Fix pytest errors.
* Update homeassistant/components/modbus/binary_sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/modbus/binary_sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/modbus/modbus.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/modbus/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/modbus/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/modbus/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/modbus/switch.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/modbus/switch.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/modbus/switch.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* ToogleEntity -> SwitchEntity and add abastract
* Update homeassistant/components/modbus/switch.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/modbus/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* removed if/else in test.
* Remove other if.
Co-authored-by: Vladimir Zahradnik <vladimir@zahradnik.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* ZHA lock code services and events
* ZHA Locks: A few more services, use the library functions
* Catch exception when command id is not in command list
* Add tests for lock code services
* Add tests for enable/disable
* Better document code slot ID shifting
* Simplify cluster commands
* Simplify maxcube integration
Device objects returned by maxcube-api dependency are stable, so
we do not need to resolve from the device address every time.
Also, refactor and unify how maxcube integration sets temperature & mode.
* Add tests for maxcube component
* Use homeassistant.util.utcnow to retrieve current time
* Revert "Simplify maxcube integration"
This reverts commit 84d231d5bd.
* Make test pass again after rolling back integration changes
We added a warning when this happens last April and gave developers
a year to fix the instability. We now prevent the instability by
raising RuntimeError when code attempts to do known I/O in the
event loop instead of the executor.
We now provide a suggestion on how to fix the code that is causing
the issue.
* git push --all origin
* Fix percentage to ordered list conversion
* Tests for mqtt fan and fixes
* Improve tests and error handling base config
* Additional tests
* Tests completed, small fixes
* Allow preset mode and percentages combined
* Remove raise in setup and update tests
* Alignment with fan entity mode
* Fix pylint for len-as-condition
* Remove python binary cache file from PR
* Additional tests on async_turn_on and fix
* Added comments for deprecation of speeds
* Schema checks before init
* Optimize pre schema checks
* Correct schema checks
* Update homeassistant/components/mqtt/abbreviations.py
Comment speeds for mqtt fan are deprecated not needed here
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/fan.py
Comment speeds for mqtt fan are deprecated not needed here
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/fan.py
Comment speeds for mqtt fan are deprecated not needed here
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/fan.py
Comment speeds for mqtt fan are deprecated not needed here
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/fan.py
Comment speeds for mqtt fan are deprecated not needed here
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Warnings for exceptions - testing speed_range
* Update homeassistant/components/mqtt/abbreviations.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/fan.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/fan.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/fan.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/fan.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/fan.py
* Save with black
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add tests for Netatmo data handler
* Clean up coveragerc
* Move block to fixture
* Minor update
* Remove tests of implementation details for data handler
* Update homeassistant/components/netatmo/data_handler.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/netatmo/data_handler.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Import callback
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add tests for Netatmo sensor
* Fix coveragerc
* Remove freezegun dependency
* Use f-strings instead of string concatenation
* Update tests/components/netatmo/test_sensor.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Address comment on config options test
* Replace deprecated call to async_get_registry()
* Fix public weather sensor update test
* Clean up
* Prevent division by zero
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add proper percentage support to deCONZ fan integration
* Properly convert speed to percentage
* Remove disabled method
* Replace convert_speed with a dict
* Increase test coverage of deCONZ device triggers
* Revert removed new line
* Found a way to explicitly assert that exceptions are raised
* Remove unnecessary block till done
* Fix unnecessary elif
* Fix review comments
* Remove helper tests
* Remove login details before logging stream source
* Convert to str before re
* Use compiled RE
* Add tests and filter log message in worker
* Update import
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* isort
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* ScreenLogic cleanup.
Bump screenlogicpy to 0.2.0.
Move heating functions from water_heater to climate platform.
Address notes from original PR.
* Fix temperature attribute
* Addressing notes.
Bump screenlogicpy to 0.2.1.
Made device_types constants.
Made (known) equipment flags constants.
Used dict.get() in places where None is the default.
Return fast with good _last_preset.
* Update homeassistant/components/screenlogic/climate.py
Let base entity handle state property.
Co-authored-by: J. Nick Koston <nick@koston.org>
* Patch integration setup functions.
* Exception, ATTR_TEMPERATURE notes
Co-authored-by: J. Nick Koston <nick@koston.org>
* Added handle_event for set_level command in dimmable devices
* refactor common code for dimmable devices
* Force tests
Silly change to force tests execution
* fix super()
* add rflink dim utils
* Improve uvc test camera
* Clean setup full config
* Clean setup partial config
* Set more camera defaults
* Clean setup partial config v31x
* Clean setup incomplete config
* Clean setup nvr errors during indexing
* Clean setup nvr errors during initialization
* Clean properties
* Fix motion recording mode properties
* Clean stream
* Clean login
* Clean login v31x
* Clean login tries both addres and caches
* Clean login fails both properly
* Remove not needed test
* Clean camera image error
* Test snapshot login retry
* Clean up
* Test enable and disable motion detection
* Times must be UTC
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Better status control on restore
* Better status control on restore
* fix code coverage
* Rollback hvac_mode initialization
I think I have better understood the handling of the `hvac_mode`.
I change the approach. Now the thermostat doesn't initialize until the switch is available.
* fix pyupgrade
* fix black
* Delete test_turn_on_while_restarting
HVAC mode should not be modified by the switch.
IMHO, this test does not make sense because if the switch is turned on the thermostat is not turning on (and not changing HVAC_MODE)
* Re add turn off if HVAC is off
If HVAC_MODE is off thermostat will not control heater switch. This can be because `initial_hvac_mode`, because state defaults to or because old_state.
IMHO it is preferable to be excessively cautious.
* Update climate.py
* Change warning message
* Fix black
* Fix black
* Add tests for Netatmo light
* Improve docstring
* Register the camera data class for the light platform
* Remove freezegun dependency
* Update tests
* Update tests/components/netatmo/test_light.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Deduplicate webhook test data
* Mock pytest to verify it is called
* Don't test internals
* Rename
* Assert light still on with erroneous event data
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add definitions for grouping media players
See https://github.com/home-assistant/architecture/issues/364
* Fix Google Assistant tests
* Define sync versions of async_join_players/async_unjoin
* Don't use async API in synchronous test methods
* Fix tests and make pylint happy
The method name `unjoin` is used by another component, so let's use
`unjoin_player` instead.
* Fix emulated_hue tests
The new media player entity in the `demo` component requires a tiny
adjustment in the emulated_hue tests.
* Use "target:" in service description
* Also use "name:" in service descriptions
Co-authored-by: Franck Nijhof <git@frenck.dev>
* Delay ZHA group updates to ensure all members are updated first
After turning off a group, when the first device reports "off", the
other devices may still be "on". If HA processes the group state update
quickly enough, the group will see that some devices are on, so the
state of the group will revert back to "on", and then "off" when the
remaining devices all report "off". That would cause the UI toggle to go
back and forward quickly, and automations that trigger with "state: on"
to fire when the user turns the group off.
This PR fixes that by delaying the group state update, giving time for
all the devices to report their states first.
* Fix zha group tests
* Reorder sleeping.
* Update tests/components/zha/common.py
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
* add flag to prevent sending an on command
* fix condition
* add constant for default transition
* make groups work with new force on flag
* reorder light entity creation
* rearrange logic
* update test
* remove failed attempt at group light flag
* fix flag
* Correct trace for choose and repeat script actions
* only choose-wrap the choices
* Update tests
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Add suggested_area to MQTT Discovery
This adds suggested_area to MQTT discovery, so that the discovered devices could be automatically added to the proper area.
* Add abbreviation for MQTT suggested_area
* Remove extra whitespace
* Remove extra whitespace #2
* Added tests for MQTT Dicovery of suggested_area
* Fix test for MQTT suggested_area
* Better tests of MQTT suggested_area
Changes made as per feedback from @emontnemery
* Fix homekit checking for port cleanup too many times
The loop should have terminated as soon as the port was available
* coverage
* tweak homekit shutdown wait
* Add timeouts on recving packets
Add a timeout when recving packets from the worker thread in case it hangs.
Add an exit condition just in case the while loop goes on forever.
* Add a timeout to recorder thread join.
* Wait for recorder thread to be invoked in tests
Remove the while loop and instead wait for segments to be produced by the background worker thread.
* Allow worker to resume before stopping to fix timeouts
* Lower test timeout further
* Remove test_stream_ended since it is flaky
This test doesn't really add additional value on top of other tests.