sanjoyg / dirigera_platform

HomeAssistant Integration for Dirigera Platform
MIT License
122 stars 16 forks source link

Parasoll Open/Close sensor entity missing #13

Closed msaario closed 8 months ago

msaario commented 8 months ago

Hi, Parasoll Door/Window sensor does not seem to expose sensor for open/close status. The only sensor will only reflect if device is online with on regardless of open/close status. Is it possible to add open/close sensor entity? Screen Shot 2024-03-05 at 21 57 55 PM

JSON dump:

[custom_components.dirigera_platform] [{'id': 'b6f5fdf9-e443-4c91-a14e-8c7fc875194d_1', 'relationId': 'b6f5fdf9-e443-4c91-a14e-8c7fc875194d', 'type': 'gateway', 'deviceType': 'gateway', 'createdAt': '2023-12-14T14:08:11.961Z', 'isReachable': True, 'lastSeen': '2024-03-05T20:35:00.475Z', 'attributes': {'customName': 'Ikea Housy', 'model': 'DIRIGERA Hub for smart products', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.505.2', 'hardwareVersion': 'P2.5', 'serialNumber': 'b6f5fdf9-e443-4c91-a14e-8c7fc875194d', 'identifyStarted': '2023-12-14T14:08:14.000Z', 'identifyPeriod': 65534, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoDownload', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00', 'permittingJoin': False, 'backendConnected': True, 'backendConnectionPersistent': True, 'backendOnboardingComplete': True, 'backendRegion': 'eu-central-1', 'backendCountryCode': 'ES', 'userConsents': [{'name': 'analytics', 'value': 'disabled'}, {'name': 'diagnostics', 'value': 'enabled'}], 'logLevel': 3, 'coredump': False, 'timezone': 'Europe/Madrid', 'nextSunSet': '2024-03-06T17:48:00.000Z', 'nextSunRise': '2024-03-06T06:18:00.000Z', 'homestateValue': 'home', 'homestateLastChanged': '2023-12-14T14:08:11Z', 'countryCode': 'XZ', 'coordinates': {'latitude': 41.4126408, 'longitude': 2.2175444, 'accuracy': -1}, 'isOn': False}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'permittingJoin', 'userConsents', 'logLevel', 'time', 'timezone', 'countryCode', 'coordinates']}, 'deviceSet': [], 'remoteLinks': []}, {'id': '49aed858-cc63-42c2-add1-43696d155962_1', 'type': 'sensor', 'deviceType': 'openCloseSensor', 'createdAt': '2024-02-26T16:58:28.000Z', 'isReachable': True, 'lastSeen': '2024-03-05T21:34:38.000Z', 'customIcon': 'placement_door', 'attributes': {'customName': 'Parasoll door sensor', 'firmwareVersion': '1.0.19', 'hardwareVersion': '1', 'manufacturer': 'IKEA of Sweden', 'model': 'PARASOLL Door/Window Sensor', 'productCode': 'E2013', 'serialNumber': '3C2EF5FFFE4210BE', 'batteryPercentage': 85, 'identifyPeriod': 0, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'isOpen': False, 'permittingJoin': False}, 'capabilities': {'canSend': [], 'canReceive': ['customName']}, 'room': {'id': 'b2d74682-83b0-4b45-87be-b3ced9c2651c', 'name': 'Entrance', 'color': 'ikea_yellow_no_31', 'icon': 'rooms_door'}, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False}]

Thanks.

slajob commented 8 months ago

do you have access to the logs? If yes please include your logs

msaario commented 8 months ago

do you have access to the logs?

If yes please include your logs

I found so far only the attached content from the logs, which seems to mention the sensor and status.

Let me know if there is anything else I should look for in logs.

slajob commented 8 months ago

Okey never mind :D I added missing device class in my fork and it can cause this but maybe it's not all. I'm not sure how to test it without sensor. When in my local ikea this sensor appears i'll buy it and try by myself. Until @sanjoyg don't merge my big PR, maybe you can try install my fork and check if it's working before we merge it to this official repo?

sanjoyg commented 8 months ago

Merge done, try 1.3.3 release and let us know

msaario commented 8 months ago

I confirm 1.3.3 fixed this issue. Door sensor is now visible open/closed, with slight delay of a few seconds to update changes. Thanks!

slajob commented 8 months ago

That's great! This slight delay also accurs in blinds position update, so I'll try to fix it soon :dancers: