* The api reports success before the state change
takes effect
* We now set state optimistically and followup with
an update 4 seconds in the future after any state change to
verify it actually happens.
* When hvac_mode is passed to the set_temperature service
we now switch to the desired mode.
* Add remote platform to hue integration
supporting ZGPSwitch, ZLLSwitch and ZLLRotary switches.
* Ported from custom component Hue-remotes-HASS from @robmarkcole
* Add options flow for hue, to toggle handling of sensors and remotes
* Sensors are enabled by default, and remotes are disabled,
to not generate any breaking change for existent users.
Also, when linking a new bridge these defaults are used,
so unless going explicitly to the Options menu,
the old behavior is preserved.
* SensorManager stores the enabled platforms and ignores everything else.
* Bridge is created with flags for `add_sensors` and `add_remotes`,
and uses them to forward entry setup to only the enabled platforms.
* Update listener removes disabled kinds of devices when options are changed,
so device list is in sync with options, and disabled kinds disappear from HA,
leaving the enable/disable entity option for individual devices.
* Fix hue bridge mock with new parameters
* Revert changes in hue bridge mock
* Remove OptionsFlow and platform flags
* Extract `GenericHueDevice` from `GenericHueSensor`
to use it as base class for all hue devices, including those without any entity,
like remotes without battery.
* Add `HueBattery` sensor for battery powered remotes
and generate entities for TYPE_ZLL_ROTARY and TYPE_ZLL_SWITCH remotes.
* Remove remote platform
* Add HueEvent class to fire events for button presses
* Use `sensor.lastupdated` string to control state changes
* Event data includes:
- "id", as pretty name of the remote
- "unique_id" of the remote device
- "event", with the raw code of the pressed button
('buttonevent' or 'rotaryevent' property)
- "last_updated", with the bridge timestamp for the button press
* Register ZGP_SWITCH, ZLL_SWITCH, ZLL_ROTARY remotes
* fix removal
* Exclude W0611
* Extract GenericHueDevice to its own module
and solve import tree, also fixing lint in CI
* Store registered events to do not repeat device reg
* Minor cleaning
* Add tests for hue_event and battery entities for hue remotes
* Best effort state initialization of bayesian binary sensor.
Why:
* https://github.com/home-assistant/home-assistant/issues/30119
This change addresses the need by:
* Running the main update logic eagerly for each entity being observed
on `async_added_to_hass`.
* Test of the new behavior.
* Refactor in order to reduce number of methods with side effects that
mutate instance attributes.
* Improve test coverage
Why:
* Because for some reason my commits decreased test coverage.
This change addresses the need by:
* Adding coverage for the case where a device returns `STATE_UNKNOWN`
* Adding coverage for configurations with templates
* rebase and ensure upstream tests passed
* Delete commented code from addressing merge conflict.
* Add HomeKit support for slat tilting
* Reset tilt-specific attribute, not position attribute
Co-Authored-By: J. Nick Koston <nick@koston.org>
* Add explanation why we fix HomeKit's targets
We have to assume that the device has worse precision than HomeKit. If it
reports back a state that is only _close_ to HK's requested state, we'll
"fix" what HomeKit requested so that it won't appear out of sync.
Co-authored-by: J. Nick Koston <nick@koston.org>
* Create __init__.py
* Create manifest.json
* Update zeroconf.py
* more work on integration
* more work on integration.
* add more sensor tests.
* Update const.py
* Update sensor.py
* more work on ipp.
* Update test_config_flow.py
* more work on ipp.
* Update config_flow.py
* Update config_flow.py
* Update Meteo_France Weather constants
Updating Meteo_France integration with more weather "condition" returned by the web service.
Adding:
- "Nuit claire" (note the lower 'c') mapped to "clear-night"
- "Brume" mapped to "fog"
* Black formatting update
* add services for DSP
* add homeassistant/components/kef/const.py
* add services.yaml
* fix set_mode
* fix services
* media_player.py fixes
* bump aiokef to 0.2.9
* update requirements_all.txt
* add basic sensor.py
* add DSP settings as attributes
* add message about kef.update_dsp
* remove sensor.py
* fix pylint issues
* update_dsp inside async_added_to_hass
* use {...} instead of dict(...)
* get DSP settings when connecting to HA or once on update
* simplify condition
* do not get mode twice
* remove async_added_to_hass
* use async_register_entity_service
* remove entity_id from schema and prepend _value
* invalidate self._dsp after setting a DSP setting
* schedule update_dsp every hour
* subscribe and unsubscribe on adding and removing to HA
* don't pass hass and set _update_dsp_task_remover to None after removing
* add third stage to hass shutdown
* use 3rd stage in storage
* update core state
* add writing data to multi stop ignore
* update core test
* review comment
* update name based on feedback
* Add include_location_attributes
* Add check for different state
* Fix things
* Drop filter
* significant changes only
* Change default behavior
* Remove trailing commas
* Tado climate state moved to python-tado
* Resolve various incorrect states and add tests for known tado zone states
* Write state instead of calling for an update
This is a redux of pr #32564 with all of the zone state now moved into
python-tado and tests added for the various states.
* stale string
* add missing undos to dispachers
* remove unneeded hass
* naming
* rearrange
* fix water heater, add test
* fix water heater, add test
* switch hvac mode when changing temp if in auto/off/smart
* add test to for importing multiple output settings
* provide option to set multiple output states
* tweaks after testing
* Update homeassistant/components/konnected/config_flow.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Prevent nut from doing I/O in the event loop
device_state_attributes would call for an update if the
throttle happened to expire.
* _format_display_state no self use
* Modbus: remove legacy code
flexit and stiebel_el are updated to import modbus.const,
therefore legacy code can be removed.
* Flexit: update const reference from modbus
climate.py imports from modbus direct, this is legacy and will
result in errors.
update import to be modbus.const.
* Stiebel_el: update reference to modbus
__init.py references modbus directly, this is legacy and will
give errors.
Update import to be modbus.const.
* Use new labels for HomematicIP Cloud multi devices
* Update homeassistant/components/homematicip_cloud/device.py
Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>
* Update name composition
Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
* modbus: bumb pymodbus version to 2.3.0
pymodbus version 1.5.2 did not support asyncio, and in general
the async handling have been improved a lot in version 2.3.0.
updated core/requirement*txt
* updated core/CODEOWNERS
committing result of 'python3 -m script.hassfest'.
* modbus: change core connection to async
change setup() --> async_setup and update() --> async_update()
Use async_setup_platform() to complete the async connection to core.
listen for EVENT_HOMEASSISTANT_START happens in async_setup()
so it needs to be async_listen.
But listen for EVENT_HOMEASSISTANT_STOP happens in start_modbus()
which is a sync. function so it continues to be listen().
* modbus: move setup of pymodbus into modbushub
setup of pymodbus is logically connected to the class modbushub,
therefore move it into the class.
Delay construction of pymodbus client until event
EVENT_HOMEASSISTANT_START arrives.
* modbus: use pymodbus async library
convert pymodbus calls to refer to the async library.
Remark: connect() is no longer needed, it is done when constructing
the client. There are also automatic reconnect.
* modbus: use async update for read/write
Use async functions for read/write from pymodbus.
change thread.Lock() to asyncio.Lock()
* Modbus: patch for slow tcp equipment
When connecting, via Modbus-TCP, so some equipment (like the
huawei sun2000 inverter), they need time to prepare the protocol.
Solution is to add a asyncio.sleep(x) after the connect() and before
sending the first message.
Add optional parameter "delay" to Modbus configuration.
Default is 0, which means do not execute asyncio.sleep().
* Modbus: silence pylint false positive
pylint does not accept that a class construction __new__
can return a tuple.
* Modbus: move constants to const.py
Create const.py with constants only used in
the modbus integration.
Duplicate entries are removed, but NOT any entry that would
lead to a configuration change.
Some entries were the same but with different names, in this
case renaming is done.
Also correct the tests.
* Modbus: move connection error handling to ModbusHub
Connection error handling depends on the hub, not the
entity, therefore it is logical to have the handling in
ModbusHub.
All pymodbus call are added to 2 generic functions (read/write)
in order not to duplicate the error handling code.
Added property "available" to signal if the hub is connected.
* Modbus: CI cleanup
Solve CI problems.
* Modbus: remove close of client
close() no longer exist in the pymodbus library, use
del client instead.
* Modbus: correct review comments
Adjust code based on review comments.
* Modbus: remove twister dependency
Pymodbus in asyncio mode do not use twister but still throws a
warning if twister is not installed, this warning goes into
homeassistant.log and can thus cause confusion among users.
However installing twister just to avoid the warning is not
the best solution, therefore removing dependency on twister.
* Modbus: review, remove comments.
remove commented out code.