Rachio component modernization (#16911)
Add `unique_id` to all rachio entities Add platform discovery to rachio component Move config options from switch.rachio platform to the rachio component
This commit is contained in:
parent
f879ac0993
commit
9abdbf3db6
3 changed files with 38 additions and 17 deletions
|
@ -92,6 +92,11 @@ class RachioControllerOnlineBinarySensor(RachioControllerBinarySensor):
|
|||
"""Return the name of this sensor including the controller name."""
|
||||
return "{} online".format(self._controller.name)
|
||||
|
||||
@property
|
||||
def unique_id(self) -> str:
|
||||
"""Return a unique id for this entity."""
|
||||
return "{}-online".format(self._controller.controller_id)
|
||||
|
||||
@property
|
||||
def device_class(self) -> str:
|
||||
"""Return the class of this device, from component DEVICE_CLASSES."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue