* add config flow
* fix tests
* adjust and fix tests
* fix tests
* config_zones as fixture
* add config flow tests
* use coordinator.async_config_entry_first_refresh
* use entry.entry_id for hass.data
* fix doc string
* remove unused unit_of_measurement string key
* don't store friendly_name, just use self.name
* abort on matching entiry
* break out legacy setup into seperate function
* make tracked entites required
* move _asnyc_setup_legacy to module level
* use zone name as config entry title
* add entity_used_in helper
* check entry source if imported
* create repair issue for removed tracked entities
* separate state change from registry change event handling
* migrate unique ids after tracked entity renamed
* use full words for the variable names
* use defaultdict
* add test
* remove unnecessary if not in check
* use unique_id of tracked entity
* use the entity registry entry id
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* stub out zha update entity
* update matcher
* updates based on assumptions / conversation
* hook into current installed version
* post rebase cleanup
* incorporate zigpy changes
* fix async_setup_entry
* fix sw_version
* make ota work with config diagnostic match
* fix version format
* sync up with latest Zigpy changes
* fix name attribute
* disable ota providers for tests
* update device list
* review comment
* add current_file_version to Ota ZCL_INIT_ATTRS
* updates to update and start tests
* get installed version from restore data
* better version handling
* remove done todo notes
* reorganize test
* move image notify to cluster handler
* add test for manual update check
* firmware update success test
* coverage
* use zigpy defs
* clean up after rebase
* bump Zigpy
* cleanup from review comments
* fix busted F string
* fix empty error
* move inside check
* guard zigbee network from bulk check for updates
* Correct handling of power_factor ElectricalMeasurement attribute
The Zigbee Cluster Library defines PowerFactor as an int8 with value supported from -100 to 100.
Currently the zha sensor handler attempts to apply the ac_power_divisor and ac_power_multiplier formatters against the attribute value, the spec outlines that this should not be the case.
The impact of the current code is that quirks not using the default values of 1 are multiplying/dividing
power and power factor values prior to updating the cluster attribute.
This results in either a non-conformant power_factor e.g. the value was multiplied by 10 so that an ac_power_divider of 10 could be used, or the power readings sacrificing a point of measurement for lower readings.
Two quirks currently use this workaround:
* ts0601_din_power.py
* ts0601_rcbo.py
* Update ZHA Metering formatter to perform None check on _div_mul_prefix
To address feedback:
https://github.com/home-assistant/core/pull/107641#discussion_r1447547054
* _div_mul_prefix needs self reference
* Simplify None check for _div_mul_prefix
Co-authored-by: Joakim Plate <elupus@ecce.se>
* Updates to formatting and CI test typing fix
* Use ' | ' in place of Union
* Add tests for power_factor sensor
---------
Co-authored-by: Joakim Plate <elupus@ecce.se>
* Allow `window_covering_type` to be `None`
* Create a `window_covering_mode` attribute and simplify inversion switch
* Revert "Create a `window_covering_mode` attribute and simplify inversion switch"
This reverts commit 048d649b4d.
* check both config status and mode
* coverage
---------
Co-authored-by: David Mulcahey <david.mulcahey@icloud.com>
* Update smartenergy.py metering_device_type enums
* Added missing enum 127
* Enum 127 is also electric metering type
* Meter type constants and status enums in smartenergy cluster handler
Addresses
https://github.com/home-assistant/core/pull/109126#discussion_r1471383887
Whilst I have the code open I've also added status handlers for the non-electrical meter types.
* New tests for different metering device type statuses
* Simplify MQTT device trigger
* Add test non unique trigger_id
* Adjust deprecation warning
* Make discovery_id optional
* refactor double if
* Improve validation, add tests and deprecation comments
* Avoid breaking change
* Inmprove error message
* Match on discovery_id instead of discovery_info
* Revert an unrelated change
* follow up comments
* Add comment and test on device update with non unique trigger
* Update homeassistant/components/mqtt/device_trigger.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/device_trigger.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add volume flow rate conversions
* Add missing translations
* Adjust liter unit and add gallons per minute
* Adjust to min instead of m for minutes
* Add matching class for number
* Add some tests for number and sensor platform
* Add deprecated constants
* Add explicit list of flow rate for check
This reverts commit 105171af31.
* Update calendar tests to use mock entities instead of demo platform
* Add Generator type to fixture
* Fix generator syntax
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>