mirror of
https://github.com/home-assistant/core.git
synced 2025-11-07 09:59:30 +00:00
Append vera device id to entity id - but not name. (#6523)
* Append vera device id to entity id - but not name. * Tidy. * Tidy. * Tidy after review. * Re-order.
This commit is contained in:
committed by
Paulus Schoutsen
parent
b2a2193ba3
commit
10f5e9744b
@@ -7,9 +7,9 @@ https://home-assistant.io/components/binary_sensor.vera/
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
BinarySensorDevice)
|
||||
BinarySensorDevice, ENTITY_ID_FORMAT)
|
||||
from homeassistant.components.vera import (
|
||||
VeraDevice, VERA_DEVICES, VERA_CONTROLLER)
|
||||
VERA_CONTROLLER, VERA_DEVICES, VeraDevice)
|
||||
|
||||
DEPENDENCIES = ['vera']
|
||||
|
||||
@@ -30,6 +30,7 @@ class VeraBinarySensor(VeraDevice, BinarySensorDevice):
|
||||
"""Initialize the binary_sensor."""
|
||||
self._state = False
|
||||
VeraDevice.__init__(self, vera_device, controller)
|
||||
self.entity_id = ENTITY_ID_FORMAT.format(self.vera_id)
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
|
||||
Reference in New Issue
Block a user