Add device info to Freedompro (#52715)

* Update Freedompro

* Update homeassistant/components/freedompro/light.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
stefano055415 2021-07-09 16:36:13 +02:00 committed by GitHub
parent 2787dc9e97
commit 1e6229dd7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View File

@ -43,6 +43,14 @@ class Device(CoordinatorEntity, LightEntity):
self._attr_unique_id = device["uid"]
self._type = device["type"]
self._characteristics = device["characteristics"]
self._attr_device_info = {
"name": self.name,
"identifiers": {
(DOMAIN, self.unique_id),
},
"model": self._type,
"manufacturer": "Freedompro",
}
self._attr_is_on = False
self._attr_brightness = 0
color_mode = COLOR_MODE_ONOFF

View File

@ -15,7 +15,7 @@ DEVICES = [
},
{
"uid": "3WRRJR6RCZQZSND8VP0YTO3YXCSOFPKBMW8T51TU-LQ*ILYH1E3DWZOVMNEUIMDYMNLOW-LFRQFDPWWJOVHVDOS",
"name": "Bedroom fan",
"name": "bedroom",
"type": "fan",
"characteristics": ["on", "rotationSpeed"],
},
@ -39,7 +39,7 @@ DEVICES = [
},
{
"uid": "3WRRJR6RCZQZSND8VP0YTO3YXCSOFPKBMW8T51TU-LQ*1JKU1MVWHQL-Z9SCUS85VFXMRGNDCDNDDUVVDKBU31W",
"name": "Irrigation switch",
"name": "irrigation",
"type": "switch",
"characteristics": ["on"],
},
@ -81,7 +81,7 @@ DEVICES = [
},
{
"uid": "3WRRJR6RCZQZSND8VP0YTO3YXCSOFPKBMW8T51TU-LQ*TWMYQKL3UVED4HSIIB9GXJWJZBQCXG-9VE-N2IUAIWI",
"name": "Bedroom thermostat",
"name": "thermostat",
"type": "thermostat",
"characteristics": [
"heatingCoolingState",
@ -91,7 +91,7 @@ DEVICES = [
},
{
"uid": "3WRRJR6RCZQZSND8VP0YTO3YXCSOFPKBMW8T51TU-LQ*3XSSVIJWK-65HILWTC4WINQK46SP4OEZRCNO25VGWAS",
"name": "Bedroom window covering",
"name": "blind",
"type": "windowCovering",
"characteristics": ["position"],
},