Great idea for integration. Unfortunately, it doesn’t work for me. I’ll be happy to assist in any way possible.
Im runing HA in a docker environment on Ubuntu. Several custom integrations work like a charm.
2019-12-09 21:59:58 ERROR (MainThread) [homeassistant.components.cover] hd_powerview: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 448, in async_device_update
await self.async_update()
File "/config/custom_components/hd_powerview/cover.py", line 109, in async_update
self._cover_data = self._pv.get_shade(self._cover_id)
File "/config/custom_components/hd_powerview/cover.py", line 155, in get_shade
shade = Shade(request['id'], b64decode(request['name']).decode('UTF-8'), round((request['positions']['position1'] / 65535) * 100), round(request['batteryStrength'] / 2))
KeyError: 'id'
power-view-hub-ip/api/shades returns
{
"shadeIds": [
20516,
31636,
55784
],
"shadeData": [
{
"id": 20516,
"type": 42,
"capabilities": 0,
"batteryStatus": 3,
"batteryStrength": 165,
"roomId": 15451,
"firmware": {
"revision": 1,
"subRevision": 8,
"build": 1944
},
"motor": {
"revision": 51,
"subRevision": 52,
"build": 11825
},
"name": "U21hbGwgTGl2aW5n",
"groupId": 57728,
"positions": {
"position1": 65535,
"posKind1": 1
},
"signalStrength": 4
},
{
"id": 31636,
"type": 42,
"capabilities": 0,
"batteryStatus": 3,
"batteryStrength": 163,
"roomId": 15451,
"firmware": {
"revision": 1,
"subRevision": 8,
"build": 1944
},
"motor": {
"revision": 51,
"subRevision": 52,
"build": 11825
},
"name": "QmlnIExpdmluZw==",
"groupId": 57728,
"signalStrength": 4,
"positions": {
"position1": 0,
"posKind1": 1
}
},
{
"id": 55784,
"type": 42,
"capabilities": 0,
"batteryStatus": 2,
"batteryStrength": 120,
"roomId": 14714,
"firmware": {
"revision": 1,
"subRevision": 8,
"build": 1944
},
"motor": {
"revision": 51,
"subRevision": 52,
"build": 11825
},
"name": "QmVkcm9vbSBCbGluZHM=",
"groupId": 7921,
"signalStrength": 4,
"positions": {
"posKind1": 1,
"position1": 3
}
}
]
}