Add via_hub docs (#88)

This commit is contained in:
Paulus Schoutsen 2018-09-17 13:39:40 +02:00 committed by GitHub
parent b13c07bad4
commit cfae0e523e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
| name | Name of this device
| 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.
| model | The model of the device.
| config_entries | Config entries that are linked to this 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
@ -42,6 +43,7 @@ class HueLight(LightEntity):
'manufacturer': self.light.manufacturername,
'model': self.light.productname,
'sw_version': self.light.swversion,
'via_hub': (hue.DOMAIN, self.api.bridgeid),
}
```