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:
parent
6d624ecb46
commit
09729e8c46
18 changed files with 303 additions and 139 deletions
|
@ -17,7 +17,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
|||
|
||||
from . import setup_mysensors_platform
|
||||
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo
|
||||
from .device import MySensorsEntity
|
||||
from .device import MySensorsChildEntity
|
||||
from .helpers import on_unload
|
||||
|
||||
|
||||
|
@ -50,7 +50,7 @@ async def async_setup_entry(
|
|||
)
|
||||
|
||||
|
||||
class MySensorsRemote(MySensorsEntity, RemoteEntity):
|
||||
class MySensorsRemote(MySensorsChildEntity, RemoteEntity):
|
||||
"""Representation of a MySensors IR transceiver."""
|
||||
|
||||
_current_command: str | None = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue