Add Mysensors battery sensor (#100749)

* Move child related stuff to MySensorsChildEntity

* Dispatch signal for newly discovered MySensors node

* Create battery entity for each MySensors node

* Removed ATTR_BATTERY_LEVEL attribute from each node sensor

Attribute is redundant with newly introduced battery sensor entity

* Apply suggestions from code review

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Daniel Trnka 2023-09-24 22:50:13 +02:00 committed by GitHub
parent 6d624ecb46
commit 09729e8c46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 303 additions and 139 deletions

View file

@ -54,7 +54,7 @@ async def async_setup_entry(
)
class MySensorsCover(mysensors.device.MySensorsEntity, CoverEntity):
class MySensorsCover(mysensors.device.MySensorsChildEntity, CoverEntity):
"""Representation of the value of a MySensors Cover child node."""
def get_cover_state(self) -> CoverState: