* Adjust pylint plugin to enforce diagnostics type hints
* Adjust return_type
* Set return_type to UNDEFINED
* Use Any for the expected data
Co-authored-by: epenet <epenet@users.noreply.github.com>
* Add MQTT humidifier unknown state support
* Update homeassistant/components/mqtt/humidifier.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Fix tests for changed default optimistic state
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add Mqtt Fan unknown state support
* Update homeassistant/components/mqtt/fan.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Adjust default state in tests
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Mqtt switch allow unkown state
* correct type
* Update discovery tests
* Optimistic mode if not state_topic is configured.
* Default state UNKNOWN in optimistic mode
* fix discovery test
* Make mypy IGNORED_MODULES file specific
* Adjust sonos type hints
* Remove legacy nest from IGNORED_MODULES
Co-authored-by: epenet <epenet@users.noreply.github.com>
* implement coordinator
* fix styling
* fix async_uload_entry
* use async_config_entry_first_refresh
* use const
* fix black
* use KEY_ROUTER
* review comments
* fix black
* ensure the coordinator keeps updating
* fix flake8
* rework setup of entities using coordinator
* styling
* check for failed get_info call
* fix
* fix setup of entities
* simplify
* do not set unique_id and device_info on scanner entity
* Update homeassistant/components/netgear/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/netgear/device_tracker.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/netgear/router.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* use entry_id instead of unique_id
* unused import
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Set last_reset for integrated entities
For entities which integrate over time (like energy in watt hours) the
iotawattpy library uses the beginning of the year as start date by
default (using relative time specification "y", see [1]). Since
PR #56974 state class has been changed from TOTAL_INCREASING to TOTAL.
However, the relative start date of "y" causes the value to reset to
zero at the beginning of the year.
This fixes it by setting last_reset properly, which takes such resets
into account.
While at it, let's set the cycle to one day. This lowers the load on
IoTaWatt (fetching with start date beginning of the day seems to
response faster than beginning of the year).
[1]: https://docs.iotawatt.com/en/master/query.html#relative-time
* Update homeassistant/components/iotawatt/sensor.py
* Update homeassistant/components/iotawatt/coordinator.py
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Cleanup sensor expire triggers after reload
* fix test binary_sensor
* Also trigger cleanup parent classes
* Restore an expiring state after a reload
* correct discovery_update
* restore expiring state with remaining time
* Update homeassistant/components/mqtt/binary_sensor.py
description
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Log remaining time
* Move check
* check and tests reload
* remove self.async_write_ha_state()
Co-authored-by: Erik Montnemery <erik@montnemery.com>