Add more HomeKit models for discovery (#24391)
* Add more HomeKit models for discovery * Discover Tradfri with HomeKit * Add Wemo device info * Allow full match for HomeKit model * Fix tests
This commit is contained in:
1 parent
b30f4b8fc0
commit
0dc0706eb2
14 files changed
+118
-19
No files matched your search
@@ -12,7 +12,7 @@ from homeassistant.util import convert
|
||||
from homeassistant.const import (
|
||||
STATE_OFF, STATE_ON, STATE_STANDBY, STATE_UNKNOWN)
|
||||
|
||||
from . import SUBSCRIPTION_REGISTRY
|
||||
from . import SUBSCRIPTION_REGISTRY, DOMAIN as WEMO_DOMAIN
|
||||
|
||||
SCAN_INTERVAL = timedelta(seconds=10)
|
||||
|
||||
@@ -93,6 +93,14 @@ class WemoSwitch(SwitchDevice):
|
||||
"""Return the name of the switch if any."""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def device_info(self):
|
||||
"""Return the device info."""
|
||||
return {
|
||||
'name': self._name,
|
||||
'identifiers': {(WEMO_DOMAIN, self._serialnumber)},
|
||||
}
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Return the state attributes of the device."""
|
||||
|
||||
Reference in new issue
Block a user