mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-19 07:16:29 +00:00
Add via_hub docs (#88)
This commit is contained in:
parent
b13c07bad4
commit
cfae0e523e
@ -15,11 +15,12 @@ The device registry is a registry where Home Assistant keeps track of devices. A
|
|||||||
| id | Unique ID of device (generated by Home Assistant)
|
| id | Unique ID of device (generated by Home Assistant)
|
||||||
| name | Name of this device
|
| name | Name of this device
|
||||||
| connections | A set of tuples of `(connection_type, connection identifier)`. Connection types are defined in the device registry module.
|
| connections | A set of tuples of `(connection_type, connection identifier)`. Connection types are defined in the device registry module.
|
||||||
| identifiers | Identifiers identify the device in the outside world. An example is a serial number.
|
| identifiers | Set of identifiers. They identify the device in the outside world. An example is a serial number.
|
||||||
| manufacturer | The manufacturer of the device.
|
| manufacturer | The manufacturer of the device.
|
||||||
| model | The model of the device.
|
| model | The model of the device.
|
||||||
| config_entries | Config entries that are linked to this device.
|
| config_entries | Config entries that are linked to this device.
|
||||||
| sw_version | The firmware version of the device.
|
| sw_version | The firmware version of the device.
|
||||||
|
| via_hub | A single identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs.
|
||||||
|
|
||||||
## Defining devices
|
## Defining devices
|
||||||
|
|
||||||
@ -42,6 +43,7 @@ class HueLight(LightEntity):
|
|||||||
'manufacturer': self.light.manufacturername,
|
'manufacturer': self.light.manufacturername,
|
||||||
'model': self.light.productname,
|
'model': self.light.productname,
|
||||||
'sw_version': self.light.swversion,
|
'sw_version': self.light.swversion,
|
||||||
|
'via_hub': (hue.DOMAIN, self.api.bridgeid),
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user