Add device classes to switch (#246)

https://github.com/home-assistant/home-assistant/pull/23149
This commit is contained in:
Joakim Plate 2019-05-02 22:03:27 +02:00 committed by Paulus Schoutsen
parent 20b83a48bd
commit 7ac43cbfcf

View File

@ -61,3 +61,10 @@ class MySwitch(SwitchDevice):
async def async_toggle(self, **kwargs):
"""Toggle the entity."""
```
### Available device classes
Optional. What type of device this. It will possibly map to google device types.
| Value | Description
| ----- | -----------
| outlet | Device is an outlet for power.
| switch | Device is switch for some type of entity.