peribeir / homeassistant-rademacher

This custom integration provides access to Rademacher Devices connected to a HomePilot (or Start2Smart) bridge.
GNU General Public License v3.0
65 stars 13 forks source link

Contact sensor is added as binary sensor #140

Open StefanKopetzky opened 1 week ago

StefanKopetzky commented 1 week ago

Good evening, I integrated a new window contact sensor from Homepilot into my smart home today. I was wondering why my automations weren't working like the others until I realized that the new sensor had been added as a binary.sensor instead of as a normal sensor with the enum values (open, tilted and closed) like the other window contacts. In the device list that I call up with IP, I see no difference between the devices, could it be that the integration here accidentally creates the wrong entity type for whatever reason? Wrongly added device for the sleeping room:

{
                "capabilities": [
                    {
                        "name": "PROD_CODE_DEVICE_LOC",
                        "value": "14771002",
                        "read_only": false
                    },
                    {
                        "name": "BATT_VALUE_EVT",
                        "value": "68",
                        "read_only": true,
                        "timestamp": 1732385611
                    },
                    {
                        "name": "REACHABILITY_EVT",
                        "value": "true",
                        "read_only": true,
                        "timestamp": 1732385672
                    },
                    {
                        "name": "CONTACT_TILTED_EVT",
                        "read_only": true,
                        "timestamp": 1732385621
                    },
                    {
                        "name": "NAME_DEVICE_LOC",
                        "value": "Fensterkontakt Schlafzimmer",
                        "read_only": false
                    },
                    {
                        "name": "PROT_ID_DEVICE_LOC",
                        "value": "aca0fa_1",
                        "read_only": false
                    },
                    {
                        "name": "INTF_ID_DEVICE_LOC",
                        "value": "3",
                        "read_only": false
                    },
                    {
                        "name": "ICONSET_LOC",
                        "value": "iconset24",
                        "read_only": false
                    },
                    {
                        "name": "DEVICE_TYPE_LOC",
                        "value": "3",
                        "read_only": false
                    },
                    {
                        "name": "CONTACT_OPENED_EVT",
                        "read_only": true,
                        "timestamp": 1732385632
                    },
                    {
                        "name": "ICONSET_INV_LOC",
                        "value": "false",
                        "read_only": false
                    },
                    {
                        "name": "BATT_LOW_EVT",
                        "value": "false",
                        "read_only": true,
                        "timestamp": 1732385672
                    },
                    {
                        "name": "BATTERY_LVL_PCT_MEA",
                        "value": "68",
                        "read_only": false,
                        "timestamp": 1732385611
                    },
                    {
                        "name": "ID_DEVICE_LOC",
                        "value": "47",
                        "read_only": false
                    },
                    {
                        "name": "CONTACT_CLOSED_EVT",
                        "read_only": true,
                        "timestamp": 1732385672
                    },
                    {
                        "name": "VIS_DEVICE_LOC",
                        "value": "true",
                        "read_only": false
                    },
                    {
                        "name": "CLOSE_CONTACT_MEA",
                        "value": "0",
                        "read_only": false,
                        "timestamp": 1732385672
                    },
                    {
                        "name": "DESCR_DEVICE_LOC",
                        "value": "Tür- und Fensterkontakt smart",
                        "read_only": false
                    }
                ]
            },

Correct added device from the bath room:

            {
                "capabilities": [
                    {
                        "name": "PROD_CODE_DEVICE_LOC",
                        "value": "14771002",
                        "read_only": false
                    },
                    {
                        "name": "BATT_VALUE_EVT",
                        "value": "100",
                        "read_only": true,
                        "timestamp": 1732347109
                    },
                    {
                        "name": "REACHABILITY_EVT",
                        "value": "true",
                        "read_only": true,
                        "timestamp": 1732385719
                    },
                    {
                        "name": "CONTACT_TILTED_EVT",
                        "read_only": true,
                        "timestamp": 1732385698
                    },
                    {
                        "name": "NAME_DEVICE_LOC",
                        "value": "Fensterkontakt Bad",
                        "read_only": false
                    },
                    {
                        "name": "PROT_ID_DEVICE_LOC",
                        "value": "ac9a9b_1",
                        "read_only": false
                    },
                    {
                        "name": "INTF_ID_DEVICE_LOC",
                        "value": "3",
                        "read_only": false
                    },
                    {
                        "name": "ICONSET_LOC",
                        "value": "iconset24",
                        "read_only": false
                    },
                    {
                        "name": "DEVICE_TYPE_LOC",
                        "value": "3",
                        "read_only": false
                    },
                    {
                        "name": "CONTACT_OPENED_EVT",
                        "read_only": true,
                        "timestamp": 1732384800
                    },
                    {
                        "name": "ICONSET_INV_LOC",
                        "value": "false",
                        "read_only": false
                    },
                    {
                        "name": "BATT_LOW_EVT",
                        "value": "false",
                        "read_only": true,
                        "timestamp": 1732385719
                    },
                    {
                        "name": "BATTERY_LVL_PCT_MEA",
                        "value": "100",
                        "read_only": false,
                        "timestamp": 1732347109
                    },
                    {
                        "name": "ID_DEVICE_LOC",
                        "value": "26",
                        "read_only": false
                    },
                    {
                        "name": "CONTACT_CLOSED_EVT",
                        "read_only": true,
                        "timestamp": 1732385719
                    },
                    {
                        "name": "VIS_DEVICE_LOC",
                        "value": "true",
                        "read_only": false
                    },
                    {
                        "name": "CLOSE_CONTACT_MEA",
                        "value": "0",
                        "read_only": false,
                        "timestamp": 1732385719
                    },
                    {
                        "name": "DESCR_DEVICE_LOC",
                        "value": "Tür- und Fensterkontakt smart",
                        "read_only": false
                    }
                ]
            },

And here a picture of the same homepilot devices added to home assistant, but one as sensor and the other as binary sensor:

image