Commit graph

117 commits

Author SHA1 Message Date
Marc Mueller
a5d376069a
Add Self typing (2) [mypy 1.0] (#87599) 2023-02-06 23:23:52 -05:00
Paul Bottein
a8b23d7139
Uses PolledSmartEnergySummation for ZLinky (#86960) 2023-01-30 22:10:55 +01:00
TheJulianJES
0cf676d501
Remove unnecessary ZHA AnalogInput sensors for Xiaomi plugs (#86261)
* Remove unnecessary ZHA AnalogInput sensors for Xiaomi plugs

* Remove AnalogInput entities from test
2023-01-25 06:17:33 -05:00
mbo18
29e3d06a42
Add unit and device class to ZHA RSSI sensor (#85390)
* Add unit device class to ZHA RSSI sensor

* Remove unit and device class for LQI

* mypy

* isort

* mypy2

* Update sensor.py
2023-01-23 07:36:21 -05:00
Paul Bottein
c3e27f6812
Add tier summation delivered for Lixee Zlinky TIC (#82602)
* Add tier summation delivered for zlinky

* Improve name case

* Add other tiers and register tier

* Fix smartenergy sensor update

* Account for new reporting configuration in unit tests

* Use cluster ID attributes instead of hardcoding the values

* Use tier names instead of the numeric constants for formatter

* Revert active register tier delivered

* Fix tests

Co-authored-by: puddly <32534428+puddly@users.noreply.github.com>
2023-01-16 10:33:18 -05:00
epenet
829c8e611e
Remove invalid device class for RSSI sensors (#85191)
* Remove invalid device class for RRSI sensors

* Restore state class
2023-01-05 15:30:52 -05:00
TheJulianJES
f740312247
Fix some typos in ZHA comments (#84881)
* Fix copy paste errors

* Fix "setup/set up" usage

* Fix typo

* Fix comment

* Fix copy paste errors

* Remove space at end of comment

* Remove double word

* Fix copy paste errors

* Fix typos

* Apply review suggestion

* Upper-case zha (to ZHA) everywhere

* Review: fix "over rules"

* Review: most/more
2023-01-02 00:20:59 -05:00
MattWestb
0854f29b7c
Fix zha RMS voltage (#84689)
Fix RMS Voltage.

class ElectricalMeasurementRMSVoltage(ElectricalMeasurement, id_suffix="rms_voltage"): is using CURRENT as unit but shall being VOLTAGE.

Fix: https://github.com/home-assistant/core/issues/84537
2022-12-28 09:27:17 -05:00
Maciej Bieniek
a8f09b4063
Round illuminance value in ZHA integration (#84500) 2022-12-23 13:24:15 +01:00
epenet
2f45e6c2ae
Use UnitOfVolumeFlowRate in integrations (#84348) 2022-12-21 11:00:24 +01:00
epenet
d63a1ab511
Use UnitOfPower.BTU_PER_HOUR in zha (#83657) 2022-12-09 15:57:57 +01:00
epenet
e3aca53899
Use new unit enums in zha (#83633)
* Use new unit enums in zha

* Add kPa

* Add kPa
2022-12-09 13:33:08 +01:00
epenet
248d5ff541
Use ApparentPower unit and device class in integrations (#83577) 2022-12-08 20:55:18 +01:00
David F. Mulcahey
5329a679bb
Add Aqara c1 pet feeder support to ZHA (#82340)
* Add Aqara c1 pet feeder support to ZHA

* clean up

* cleanup

* state classes for daily measurements

* cleanups

* cleanups

* restore the refreshing of the inverted value cache

* cleanup
2022-11-21 18:03:17 -05:00
David F. Mulcahey
20d71a869e
Add friendly entity names for ZHA sensors (#80035)
* Add friendly entity names for ZHA sensors

* lowercase 2nd word
2022-10-10 15:40:42 -04:00
epenet
e2568d8375
Import climate constants from root [m-z] (#78020) 2022-09-08 10:34:44 +02:00
epenet
325557c3e9
Use _attr_should_poll in zha entities (#77175) 2022-08-22 21:38:26 -04:00
David F. Mulcahey
3937ac2ca3
Track code coverage for ZHA sensor entities (#76617)
* Track code coverage for ZHA sensor entities

* remove correct entry
2022-08-11 21:13:27 -04:00
Marc Mueller
a3b2b5c328
Add zha typing [classmethods] (#75472) 2022-07-20 12:03:30 +02:00
Arne Mauer
d8030ed9e7
Ikea Starkvind support all models (#74615)
* Add Particulate Matter 2.5 of ZCL concentration clusters to ZHA component

* Fixed black and flake8 test

* New sensors and manufacturer cluster to support IKEA STARKVIND (with quirk)

* Fix multi_match for FilterLifeTime, device_run_time, filter_run_time sensors for Ikea starkvind

* Remove model match because sensors are matched with manufacturer channel

* Update manufacturerspecific.py

* Update number.py
2022-07-07 14:28:33 -04:00
TheJulianJES
b9b6ed33ee
Fix smart energy polling for Tuya plugs (#74640)
* Add PolledSmartEnergySummation to poll summation_delivered for some ZHA plugs

* Remove PolledSmartEnergyMetering, add stop_on_match_group to summation sensors
2022-07-07 14:27:48 -04:00
Arne Mauer
f975d30258
Fix multi_match to match with the IKEA airpurifier channel (#74432)
Fix multi_match for FilterLifeTime, device_run_time, filter_run_time sensors for ikea starkvind
2022-07-05 10:35:05 +02:00
Arne Mauer
fa678d0408
New sensors and manufacturer cluster to support IKEA STARKVIND (with Quirk) (#73450)
* Add Particulate Matter 2.5 of ZCL concentration clusters to ZHA component

* Fixed black and flake8 test

* New sensors and manufacturer cluster to support IKEA STARKVIND (with quirk)

* Isort and codespell fixes

* Instead using the fan cluster, i've created a Ikea air purifier cluster/channel that supports all sensors and fan modes

* update sensors to support the new ikea_airpurifier channel

* Fix black, flake8, isort

* Mylint/mypy fixes + Use a TypedDict for REPORT_CONFIG in zha #73629

* Last fix for test_fan.py

* fix fan test

Co-authored-by: David F. Mulcahey <david.mulcahey@me.com>
2022-06-29 11:44:40 -04:00
epenet
243905ae3e
Fix cover, light, select, sensor, switch type hints in zha (#73770)
* Fix zha sensor type hints

* Fix zha entity type hints

* Fix switch type hints

* Fix light type hints

* Fix cover type hints

* Fix select type hints
2022-06-21 21:04:24 -04:00
epenet
06e45893aa
Remove invalid type definitions in zha (#73596) 2022-06-20 11:28:53 +02:00
Arne Mauer
321394d3e2
Add Particulate Matter 2.5 of ZCL concentration clusters to ZHA component (#72826)
* Add Particulate Matter 2.5 of ZCL concentration clusters to ZHA component

* Fixed black and flake8 test
2022-06-01 18:00:58 -04:00
David F. Mulcahey
60387a417f
Add support for polled Smart Energy Metering sensors to ZHA (#71527)
* Add framework for polled se metering sensors

* add model

* find attr

* type info
2022-05-27 09:43:39 -04:00
rforro
db815a7504
ZHA Add entities for Lidl water valve quirk (#72307)
* init

* added timer number entity

* added write attribute button entity

* fixed missed errors

* minor changes & fixed failing test

* removed icon

* unit and icons
2022-05-24 19:56:03 -04:00
David F. Mulcahey
d6617eba7c
Fix bad ZHA _attr definitions (#71198) 2022-05-02 15:23:17 +02:00
David F. Mulcahey
1eb5316d89
Remove unnecessary update_before_add from ZHA (#71010)
* Additional streamlining for ZHA entity init

* fix tests
2022-04-28 20:57:26 +02:00
epenet
c44b7cc4c0
Use HVACAction in zha sensors (#70769) 2022-04-26 11:26:59 +02:00
glcos
8a73381b56
ZHA ElectricalMeasurement cluster add Frequency and Power Factor (#59417)
* Add files via upload

* Add Frequency and PF

* Add Frequency and PF

Add Frequency and PF

* Add Frequency and PF

Add Frequency and PF

* Add Frequency and PF

Add Frequency and PF

* Add Frequency and PF

Add Frequency and PF

* Update homeassistant/const.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/zha/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/const.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Fix rebase

* rebase cleanup

* fix stale doc string

* missed this again

* isort

* update tests

* update discovery test data

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: David Mulcahey <david.mulcahey@me.com>
2022-04-24 12:42:52 -04:00
Marc Mueller
53245c6523
Update pylint to 2.13.0 (#68656) 2022-03-25 15:14:48 -07:00
Dave T
62d49dcf98
Fix missing refactors of EntityCategory.XXX (#66379)
* Fix missing refactors of EntityCategory.XXX

* Fix entity_category refactor for homewizard
2022-02-12 16:22:21 +02:00
rforro
4e376181f5
Expose entity device temperature from cluster in ZHA (#64189)
* expose device temperature sensor in frontend

* fixes after runnig test

* specified device temp channel

* add dev temp int test device aqara water

* black fix
2022-01-23 09:37:01 -05:00
David F. Mulcahey
946544b08f
Update ZHA to use apparent power (#62990) 2021-12-29 10:35:17 -05:00
David F. Mulcahey
0062676f61
Add lqi and rssi sensors back to ZHA (#62716)
* update device list

* Only 1 identify button per device

* Add LQI and RSSI sensors to ZHA

* refactor entity creation filter

* update device list and update discover test

* fix reference

* code reduction

* walrus

* parens

* simplify
2021-12-24 16:48:02 -05:00
David F. Mulcahey
94324cebea
Update HVAC action handling in ZHA climate devices (#61460)
* Update HVAC action handling in ZHA climate devices

* fix class name

* align with class name changes

* get the correct sensor entity for state assertions
2021-12-12 12:11:37 -05:00
Alexei Chetroi
997809c6c4
Refactor ZHA entity matching process (#60063)
* Group multi-matches by channels

* Group multi-matched by explicit groups

* Registryless AnalogInput and PowerConfiguration

* Refactor single cluster sensor registry

* Refactor single cluster cover and lock registry

* Refactor single cluster binary_sensor registry

* Pylint
2021-12-12 07:52:49 -05:00
David F. Mulcahey
abbde8f128
Clean up state class and device class usage in ZHA (#61049)
* Clean up sensor and device class usage in ZHA

* additional cleanup

* Use EntityCategory
2021-12-11 11:51:24 -05:00
David F. Mulcahey
f6ac856b8d
Use async_on_unload from config entry in ZHA (#61015)
* remove DATA_ZHA_DISPATCHERS

* update typing information

* fix rebase
2021-12-11 11:50:03 -05:00
David F. Mulcahey
a17031630f
Use Platform enum in ZHA (#61016) 2021-12-11 11:06:39 -05:00
Alexei Chetroi
4e9fd56b8c
Add 3157100-E model to Centralite thermostat (#61073) 2021-12-05 20:36:05 -05:00
David F. Mulcahey
fd8e7ae5d9
Add PPB VOC sensor to ZHA (#60853) 2021-12-02 16:05:15 -05:00
Robin Dupont
4598353315
Add apparent_power for ZHA ElectricalMeasurement (#59857)
* Add apparent_power for ZHA ElectricalMeasurement

* Add apparent_power to REPORT_CONFIG

* update device list with apparent_power attribute

* update test decorators for apparent_power

* remove comments

* Add test for apparent_power in test_sensor
2021-11-18 19:43:08 -05:00
Piotr Majkrzak
80f1e8770a
Add Water Content Measurement clusters (#59300)
* Add Water Content Measurement clusters

* Fix typo

* Add device test

Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
2021-11-08 13:13:35 -05:00
Alexei Chetroi
cc82976d15
Add Battery sensor regardless if the battery_percent_remaining attribute is supported or not (#59264) 2021-11-07 12:53:28 -05:00
Paulus Schoutsen
366a4d24f4
Add entity category to ZHA battery (#58553) 2021-10-27 16:28:10 -07:00
Marc Mueller
d5116810d4
Use assignment expressions 08 (#57788) 2021-10-17 20:02:42 +02:00
Alexei Chetroi
723596076d
Add ZHA HVAC Action sensor (#57021)
* WIP

* Refactor multi-entity matching

Eliminate the notion on primary channel.

* Cleanup climate tests

* Refactor multi-entity match

Remove the "primary channel" in multiple entity matches

* Cleanup

* Add HVAC Action sensor

* Add a "stop_on_match" option for multi entities matches

Nominally working HVAC state sensors

* Add id_suffix for HVAC action sensor

* Fix Zen HVAC action sensor

* Pylint
2021-10-04 12:57:58 -04:00