Commit graph

128 commits

Author SHA1 Message Date
puddly
52a8f01096
Make IKEA fan sensors diagnostic in ZHA (#97747) 2023-08-17 02:15:35 +01:00
Marc Mueller
77f38e33e5
Import names from typing instead of typing_extensions [3.11] (#97065) 2023-07-22 17:03:44 -05:00
puddly
22dfa8797f
Bump ZHA dependencies (#93989)
* Make `find_entity_id` synchronous

* Remove `tries`

* Use new `attribute_updated` event signature

* Validate attributes before creating entities

* Avoid swallowing exceptions when opening covers

* Bump ZHA dependencies

* Add a matcher for Sinope water leak sensors using a non-standard ZCL attribute

* Ensure handler matching is strict, not multi

* Add type annotations for newly-updated functions
2023-06-14 21:42:31 -04:00
Joakim Plate
deaf910a24
Correct zha device classes for voc and pm25 (#94130)
Correct zha device classes
2023-06-06 23:03:59 +02:00
epenet
c475273145
Prevent SensorEntity and RestoreEntity inheritance (#88971) 2023-05-24 12:49:35 +02:00
David F. Mulcahey
2bc2c4a651
Don't poll ZHA electrical measurement sensors unnecessarily (#92330) 2023-05-01 18:32:40 +02:00
puddly
6842cdcb65
Clean up default ZHA entity names (#91841)
* Always use `Light` for lights, including subclasses

* Clean up other platforms

* Add a unit test to ensure all future entity classes have names

* Remove stale `_name`

* Address review feedback and rename `Open` to `Opening`
2023-04-25 19:51:39 -04:00
David F. Mulcahey
9c784ac622
Refactor ZHA (#91476)
* rename channel -> cluster handler

* remove refs to channels and create endpoint class

* remove remaining references to channels

* fix filter

* take in latest changes from #91403

* missed one

* missed a reference
2023-04-19 10:47:07 -04:00
TheJulianJES
47a2598b66
Add Aqara smoke sensor entities to ZHA (#90159)
* Add Aqara smoke sensor entities (WIP)

* Update smoke sensor entities (WIP)

* Drop two init attributes

* Move self-test button

* Remove self-test switch, add icons

* Add smoke sensor dbm entity

* Also add SMOKE device class to linkage alarm

Note: Enable "Linkage alarm" for this
2023-03-28 21:30:56 -04:00
J. Nick Koston
4221433ca6
Account for changed python3.11 enum.IntFlag 0 behavior in zha (#88144) 2023-02-15 11:40:48 -06:00
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
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