manzanotti / geniushub-client

Python library to provide direct connectivity to Genius Hub.
MIT License
9 stars 5 forks source link

Missing type for ESW w/temp #77

Open sftgunner opened 1 year ago

sftgunner commented 1 year ago

As mentioned in https://github.com/home-assistant/core/issues/93554, the ESW w/temp doesn't have a type object, which then causes HomeAssistant to fail to load any binary sensors. Happy to test code locally as needed!

manzanotti commented 1 year ago

Hi. Sorry for the delay in getting back to you.

Can you try replacing DEVICES_MODEL in cont.py with the following code, and let me know if it fixes your issue?

DEVICES_MODEL = [
    {"hash": "VIRTUAL", "sku": "virtual node", "description": "Virtual Node"},
    {
        "hash": "Danfoss/eTRV0100",
        "sku": "da-wrv-e",
        "description": "Wireless Radiator Valve",
        "assignableZoneTypeIds": [3, 5],
        "deviceString": "wrv",
    },
    {
        "hash": "Danfoss/eTRV0103",
        "sku": "da-wrv-e",
        "description": "Wireless Radiator Valve",
        "assignableZoneTypeIds": [3, 5],
        "deviceString": "wrv",
    },
    {
        "hash": "Genius Concepts/PH-PLG-E",
        "sku": "ph-plg-e",
        "description": "Smart Plug",
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "deviceString": "plg",
    },
    {"hash": "0x0000000000000000", "sku": "n/a", "description": "Unrecognised Device"},
    {
        "assignableZoneTypeIds": [3, 5],
        "description": "Radiator Valve",
        "deviceString": "wrv",
        "hash": "0x0000000200030005",
        "sku": "da-wrv-a",
    },
    {
        "assignableZoneTypeIds": [3, 5],
        "description": "Radiator Valve",
        "deviceString": "wrv",
        "hash": "0x0000000200040005",
        "sku": "da-wrv-b",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Dual Underfloor Receiver",
        "deviceString": "dur",
        "hash": "0x0000000220008004",
        "sku": "da-dur-a",
    },
    {
        "assignableZoneTypeIds": [1, 3, 5],
        "description": "Room Thermostat",
        "deviceString": "wrt",
        "hash": "0x0000000280100003",
        "sku": "da-wrt-c",
    },
    {
        "assignableZoneTypeIds": [3, 5],
        "description": "Genius Valve",
        "deviceString": "wrv",
        "hash": "0x00000002A0107FFF",
        "sku": "da-wrv-c",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Single Channel Receiver",
        "deviceString": "scr",
        "hash": "0x0000005900010003",
        "sku": "ho-scr-c",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Electric Switch",
        "deviceString": "esw",
        "hash": "0x0000005900010010",
        "sku": "ho-esw-d",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Dual Channel Receiver",
        "deviceString": "dcr",
        "hash": "0x0000005900020003",
        "sku": "ho-dcr-c",
    },
    {
        "assignableZoneTypeIds": [3, 5],
        "description": "Temperature Sensor",
        "deviceString": "wts",
        "hash": "0x000000590002000D",
        "sku": "ho-wts-a",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Electric Switch",
        "deviceString": "esw",
        "hash": "0x0000005900020010",
        "sku": "ho-esw-d",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Electric Switch",
        "deviceString": "esw",
        "hash": "0x0000005900030010",
        "sku": "ho-esw-e",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Electric Switch w/temp",
        "deviceString": "esw",
        "hash": "0x0000005900040010",
        "sku": "ho-esw-e",
    },
    {
        "assignableZoneTypeIds": [1, 3, 5],
        "description": "Room Thermostat",
        "deviceString": "wrt",
        "hash": "0x0000005900030001",
        "sku": "ho-wrt-b",
    },
    {
        "assignableZoneTypeIds": [1, 3, 5],
        "description": "Room Thermostat",
        "deviceString": "wrt",
        "hash": "0x0000005900050001",
        "sku": "ho-wrt-d",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Single Channel Receiver",
        "deviceString": "scr",
        "hash": "0x0000005900050003",
        "sku": "ho-scr-d",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Dual Channel Receiver",
        "deviceString": "dcr",
        "hash": "0x0000005900060003",
        "sku": "ho-dcr-d",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Smart Plug",
        "deviceString": "plg",
        "hash": "0x0000006000010003",
        "sku": "ev-plg-a",
    },
    {
        "assignableZoneTypeIds": [3, 5],
        "description": "Temperature Humidity Sensor",
        "deviceString": "ths",
        "hash": "0x0000006000010006",
        "sku": "es-ths-a",
    },
    {
        "assignableZoneTypeIds": [3, 5],
        "description": "Motion Sensor",
        "deviceString": "wms",
        "hash": "0x0000006000020001",
        "sku": "es-wms-a",
    },
    {
        "assignableZoneTypeIds": [3, 5],
        "description": "Temperature Sensor",
        "deviceString": "wts",
        "hash": "0x00000071035D0002",
        "sku": "ls-wts-a",
    },
    {
        "assignableZoneTypeIds": [3, 5],
        "description": "CO2 Sensor",
        "deviceString": "cos",
        "hash": "0x00000081000100A0",
        "sku": "sa-cos-a",
    },
    {
        "assignableZoneTypeIds": [3, 5],
        "description": "Room Sensor",
        "deviceString": "wrs",
        "hash": "0x0000008600050002",
        "sku": "al-wrs-c",
    },
    {
        "assignableZoneTypeIds": [1],
        "description": "Gas Meter Reader",
        "deviceString": "umr",
        "hash": "0x0000009600010010",
        "sku": "nq-umr-a",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Smart Plug",
        "deviceString": "plg",
        "hash": "0x0000013C00010001",
        "sku": "ph-plg-c",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Smart Plug",
        "deviceString": "plg",
        "hash": "0x0000013C00290001",
        "sku": "ph-plg-d",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Smart Plug",
        "deviceString": "plg",
        "hash": "0x0000013C00950001",
        "sku": "ph-plg-e",
    },
    {
        "assignableZoneTypeIds": [3, 5],
        "description": "Room Sensor",
        "deviceString": "wrs",
        "hash": "0x0000013C00020002",
        "sku": "ph-wrs-a",
    },
    {
        "assignableZoneTypeIds": [3, 5],
        "description": "Room Sensor",
        "deviceString": "wrs",
        "hash": "0x0000013C000C0002",
        "sku": "ph-wrs-b",
    },
    {
        "assignableZoneTypeIds": [3, 5],
        "description": "Room Sensor",
        "deviceString": "wrs",
        "hash": "0x0000013C000D0002",
        "sku": "ph-wrs-b",
    },
    {
        "assignableZoneTypeIds": [3, 5],
        "description": "Motion Sensor",
        "deviceString": "wms",
        "hash": "0x0000013C00500002",
        "sku": "ph-wms-b",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Electric Switch",
        "deviceString": "esw",
        "hash": "0x0000013C000F0001",
        "sku": "ph-esw-b",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Electric Relay",
        "deviceString": "ers",
        "hash": "0x0000013C00100001",
        "sku": "ph-ers-a",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Smart Plug",
        "deviceString": "plg",
        "hash": "0x0000013C00110001",
        "sku": "ph-plg-c",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "In Wall Meter",
        "deviceString": "iwm",
        "hash": "0x0000013C001A0006",
        "sku": "ph-iwm-a",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Smart Plug",
        "deviceString": "plg",
        "hash": "0x0000015400011100",
        "sku": "po-plg-b",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "HeatIt Relay",
        "deviceString": "esw",
        "hash": "0x0000019B02080003",
        "sku": "hi-esw-e",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Powered Room Thermostat",
        "deviceString": "prt",
        "hash": "0x0000019B02030003",
        "sku": "hi-prt-a",
    },
    {
        "assignableZoneTypeIds": [1, 2, 3, 5, 6],
        "description": "Wireless Room Thermostat",
        "deviceString": "wrt",
        "hash": "0x0000019B02040004",
        "sku": "hi-wrt-d",
    },
    {
        "assignableZoneTypeIds": [3, 5],
        "description": "Wireless Radiator Valve (beta)",
        "deviceString": "wrv",
        "hash": "0x0000006000010015",
        "sku": "ev-wrv-a",
    },
]  # from bower.js, search for: 'devicesModel: ['