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:
Greg Laabs authored and Paulus Schoutsen committed 2018-09-27 23:17:15 +02:00
1 parent f879ac0993
commit 9abdbf3db6
3 files changed
+38 -17

No files matched your search

@@ -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."""