Seems the code assumed a different `vlc_telnet` API.
Note that this doesn't address issues in `update()`, which will be
handled in a different PR.
PR extracted from #44776.
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
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 opportunity to define token for each message
* Update homeassistant/components/notify_events/notify.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
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>
* Fix missing glances temperature sensors (#44899)
* Revert matching rules for Glances
* Shorter if statement
Co-authored-by: J. Nick Koston <nick@koston.org>
* Revert long-line if statement
* Update if statement
Co-authored-by: J. Nick Koston <nick@koston.org>
* 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
* update pypoint to 2.1.0
* Add properties and device_classes to constant
* Fix unique_ids for binary_sensors
* Update device icon
* Fallback to device_class icon.
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Just use known events
* Use DEVICE_CLASS_SOUND
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* 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>
maxcube-api dependency now supports using None as the
target temperature: in that case, it uses the scheduled
temperature in auto mode and current temperature in all
other modes.
We will use that feature when changing hvac_mode to auto and
selecting PRESET_NONE.
* 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>
* Only update CecDevice state when there is new data
* Replace CecDevice with CecEntity
* Support for losing and reconnecting to pycec TcpAdapter
* Register listener in async_added_to_hass
* Rename hdmi_cec watchdog
* Only update CecDevice state when there is new data
* Fix flake8 docstring error
* Fix linter error
* Bump pycec version to 0.5.0
* Bump pycec version to 0.5.1
* Fixe merge mistake
Co-authored-by: Erik Montnemery <erik@montnemery.com>