sanjoyg / dirigera_platform

HomeAssistant Integration for Dirigera Platform
MIT License
71 stars 8 forks source link

Invalid supported color modes #19

Closed oat1 closed 3 months ago

oat1 commented 3 months ago

I get below message in HA logs

Rejestrator: homeassistant.components.light
Źródło: components/light/__init__.py:1165
integracja: Światło (dokumentacja, Problemy)
Pierwsze zdarzenie: 14:50:01 (7 zdarzenia)
Ostatnio zalogowany: 14:50:01

None (<class 'custom_components.dirigera_platform.light.ikea_bulb'>) sets invalid supported color modes [<ColorMode.BRIGHTNESS: 'brightness'>, <ColorMode.COLOR_TEMP: 'color_temp'>], this will stop working in Home Assistant Core 2025.3, please create a bug report at https://github.com/sanjoyg/dirigera_platform
sanjoyg commented 3 months ago

Would you please call the dump_json function (indicated in the wiki) , that would help resolve the issue.

oat1 commented 3 months ago

@sanjoyg I send it below 2024-03-22 17:56:18.126 INFO (SyncWorker_14) [custom_components.dirigera_platform] === START Devices JSON === 2024-03-22 17:56:18.126 INFO (SyncWorker_14) [custom_components.dirigera_platform] -------------- 2024-03-22 17:56:18.391 INFO (SyncWorker_14) [custom_components.dirigera_platform] [{'id': 'd613d6b7-098e-4bdd-adff-16cc16aaf161_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:33.000Z', 'isReachable': True, 'lastSeen': '2024-03-22T14:13:08.000Z', 'attributes': {'customName': 'Światło 4', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': '680AE2FFFE11D61A', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': '33ce7f5e-e0f2-4f0a-9e7f-f77a805382a2_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T19:00:35.000Z', 'isReachable': True, 'lastSeen': '2024-03-22T15:15:29.000Z', 'attributes': {'customName': 'Światło 7', 'model': 'TRADFRI bulb GU10 WS 400lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'EC1BBDFFFE467F3F', 'productCode': 'LED1737R5GU10', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': '51349cda-556c-4d2c-a0f0-983a06699b84', 'name': 'Julia', 'color': 'ikea_pink_no_8', 'icon': 'rooms_play_area'}, 'deviceSet': [], 'remoteLinks': ['45a42119-2f56-4326-8b80-907af9b064f4_1'], 'isHidden': False}, {'id': 'c8c88287-41d6-407a-b087-fcea6f3b0332_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:31.000Z', 'isReachable': False, 'lastSeen': '2024-03-22T09:42:12.000Z', 'attributes': {'customName': 'Światło 3', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'CCCCCCFFFE3C7DEA', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': 'd9572831-60bc-4e89-8f03-2a3a3a24be31_1', 'relationId': 'd9572831-60bc-4e89-8f03-2a3a3a24be31', 'type': 'gateway', 'deviceType': 'gateway', 'createdAt': '2023-12-15T15:44:20.614Z', 'isReachable': True, 'lastSeen': '2024-03-22T16:56:00.433Z', 'attributes': {'customName': 'Dom', 'model': 'DIRIGERA Hub for smart products', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.521.6', 'hardwareVersion': 'P2.5', 'serialNumber': 'd9572831-60bc-4e89-8f03-2a3a3a24be31', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, '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': 'PL', 'userConsents': [{'name': 'analytics', 'value': 'enabled'}, {'name': 'diagnostics', 'value': 'enabled'}], 'logLevel': 3, 'coredump': False, 'timezone': 'Europe/Warsaw', 'nextSunSet': '2024-03-23T16:55:00.000Z', 'nextSunRise': '2024-03-23T04:32:00.000Z', 'homestateValue': 'home', 'homestateLastChanged': '2023-12-15T16:44:20+01:00', 'countryCode': 'XZ', 'coordinates': {'latitude': 52.306306306306304, 'longitude': 20.98133894019359, 'accuracy': -1}, 'isOn': False}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'permittingJoin', 'userConsents', 'logLevel', 'time', 'timezone', 'countryCode', 'coordinates']}, 'deviceSet': [], 'remoteLinks': []}, {'id': '36fee6ac-4395-44c2-acac-a0ef7a2c9cc0_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:22.000Z', 'isReachable': False, 'lastSeen': '2024-03-22T09:42:05.000Z', 'attributes': {'customName': 'Światło 1', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': '000D6FFFFE5ADEE7', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': 'b4a1385d-c3ac-491c-bde4-6b81733a0d47_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T19:00:31.000Z', 'isReachable': True, 'lastSeen': '2024-03-22T15:16:30.000Z', 'attributes': {'customName': 'Światło 5', 'model': 'TRADFRIbulbGU10WS345lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '1.0.012', 'hardwareVersion': '1', 'serialNumber': '9035EAFFFE30B3B8', 'productCode': 'LED2005R5', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': '51349cda-556c-4d2c-a0f0-983a06699b84', 'name': 'Julia', 'color': 'ikea_pink_no_8', 'icon': 'rooms_play_area'}, 'deviceSet': [], 'remoteLinks': ['45a42119-2f56-4326-8b80-907af9b064f4_1'], 'isHidden': False}, {'id': '45a42119-2f56-4326-8b80-907af9b064f4_1', 'type': 'controller', 'deviceType': 'lightController', 'createdAt': '2024-03-05T19:03:05.000Z', 'isReachable': True, 'lastSeen': '2024-03-21T21:35:43.000Z', 'attributes': {'customName': 'Pilot Julia', 'model': 'TRADFRI remote control', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '24.4.5', 'hardwareVersion': '1', 'serialNumber': 'EC1BBDFFFE8C6358', 'productCode': 'E1810', 'batteryPercentage': 40, 'isOn': False, 'lightLevel': 1, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00', 'circadianPresets': []}, 'capabilities': {'canSend': ['isOn', 'lightLevel'], 'canReceive': ['customName']}, 'room': {'id': '51349cda-556c-4d2c-a0f0-983a06699b84', 'name': 'Julia', 'color': 'ikea_pink_no_8', 'icon': 'rooms_play_area'}, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False}, {'id': '678aacf3-ceb1-46b4-8938-eb16634d25d6_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T19:00:31.000Z', 'isReachable': True, 'lastSeen': '2024-03-22T15:15:13.000Z', 'attributes': {'customName': 'Światło 6', 'model': 'TRADFRI bulb GU10 WS 400lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'CCCCCCFFFEDDF64C', 'productCode': 'LED1737R5GU10', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': '51349cda-556c-4d2c-a0f0-983a06699b84', 'name': 'Julia', 'color': 'ikea_pink_no_8', 'icon': 'rooms_play_area'}, 'deviceSet': [], 'remoteLinks': ['45a42119-2f56-4326-8b80-907af9b064f4_1'], 'isHidden': False}, {'id': '085bd163-c0b0-40a4-bb31-8091328d6ce3_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:30.000Z', 'isReachable': True, 'lastSeen': '2024-03-22T14:15:46.000Z', 'attributes': {'customName': 'Światło 2', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'CCCCCCFFFE3C7738', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}] 2024-03-22 17:56:18.392 INFO (SyncWorker_14) [custom_components.dirigera_platform] -------------- 2024-03-22 17:56:18.392 INFO (SyncWorker_14) [custom_components.dirigera_platform] === END Devices JSON ===

sanjoyg commented 3 months ago

thank you, the JSON seems correct. Can you enable the debug mode of the integration and send in logs around when the error across

sanjoyg commented 3 months ago

Also curious do you see the bulbs come up in the integration as devices and are you able to operate them

oat1 commented 3 months ago

@sanjoyg I see w few of those in debug mode

2024-03-22 19:35:21.753 DEBUG (SyncWorker_29) [custom_components.dirigera_platform] Got can_receive in state 2024-03-22 19:35:21.753 DEBUG (SyncWorker_29) [custom_components.dirigera_platform] ['customName', 'isOn', 'lightLevel', 'colorTemperature'] 2024-03-22 19:35:21.753 DEBUG (SyncWorker_29) [custom_components.dirigera_platform] supported color mode set to 2024-03-22 19:35:21.753 DEBUG (SyncWorker_29) [custom_components.dirigera_platform] [<ColorMode.BRIGHTNESS: 'brightness'>, <ColorMode.COLOR_TEMP: 'color_temp'>] 2024-03-22 19:35:22.002 DEBUG (SyncWorker_39) [custom_components.dirigera_platform] Got can_receive in state 2024-03-22 19:35:22.002 DEBUG (SyncWorker_39) [custom_components.dirigera_platform] ['customName', 'isOn', 'lightLevel', 'colorTemperature'] 2024-03-22 19:35:22.002 DEBUG (SyncWorker_39) [custom_components.dirigera_platform] supported color mode set to 2024-03-22 19:35:22.002 DEBUG (SyncWorker_39) [custom_components.dirigera_platform] [<ColorMode.BRIGHTNESS: 'brightness'>, <ColorMode.COLOR_TEMP: 'color_temp'>] 2024-03-22 19:35:22.260 DEBUG (SyncWorker_2) [custom_components.dirigera_platform] Got can_receive in state 2024-03-22 19:35:22.260 DEBUG (SyncWorker_2) [custom_components.dirigera_platform] ['customName', 'isOn', 'lightLevel', 'colorTemperature'] 2024-03-22 19:35:22.260 DEBUG (SyncWorker_2) [custom_components.dirigera_platform] supported color mode set to 2024-03-22 19:35:22.260 DEBUG (SyncWorker_2) [custom_components.dirigera_platform] [<ColorMode.BRIGHTNESS: 'brightness'>, <ColorMode.COLOR_TEMP: 'color_temp'>] 2024-03-22 19:35:22.521 DEBUG (SyncWorker_22) [custom_components.dirigera_platform] Got can_receive in state 2024-03-22 19:35:22.521 DEBUG (SyncWorker_22) [custom_components.dirigera_platform] ['customName', 'isOn', 'lightLevel', 'colorTemperature'] 2024-03-22 19:35:22.521 DEBUG (SyncWorker_22) [custom_components.dirigera_platform] supported color mode set to 2024-03-22 19:35:22.521 DEBUG (SyncWorker_22) [custom_components.dirigera_platform] [<ColorMode.BRIGHTNESS: 'brightness'>, <ColorMode.COLOR_TEMP: 'color_temp'>] 2024-03-22 19:35:22.748 DEBUG (SyncWorker_4) [custom_components.dirigera_platform] Got can_receive in state 2024-03-22 19:35:22.748 DEBUG (SyncWorker_4) [custom_components.dirigera_platform] ['customName', 'isOn', 'lightLevel', 'colorTemperature'] 2024-03-22 19:35:22.748 DEBUG (SyncWorker_4) [custom_components.dirigera_platform] supported color mode set to 2024-03-22 19:35:22.748 DEBUG (SyncWorker_4) [custom_components.dirigera_platform] [<ColorMode.BRIGHTNESS: 'brightness'>, <ColorMode.COLOR_TEMP: 'color_temp'>] 2024-03-22 19:35:22.982 DEBUG (SyncWorker_10) [custom_components.dirigera_platform] Got can_receive in state 2024-03-22 19:35:22.982 DEBUG (SyncWorker_10) [custom_components.dirigera_platform] ['customName', 'isOn', 'lightLevel', 'colorTemperature'] 2024-03-22 19:35:22.983 DEBUG (SyncWorker_10) [custom_components.dirigera_platform] supported color mode set to 2024-03-22 19:35:22.983 DEBUG (SyncWorker_10) [custom_components.dirigera_platform] [<ColorMode.BRIGHTNESS: 'brightness'>, <ColorMode.COLOR_TEMP: 'color_temp'>]

I think it is correlated with this change https://developers.home-assistant.io/blog/2024/02/12/light-color-mode-mandatory/

so curious do you see the bulbs come up in the integration as devices and are you able to operate them

Yes, I am able. That is why I've installed this integration. I have 7 IKEA bulbs in my home assistant through this integration.

sanjoyg commented 3 months ago

In your logs I dont see any error coming up so am not sure if you are encountering an issue. Implemented the color_mode property as well and released a new version. Please let me know if that works for you.

oat1 commented 3 months ago

After the update all devices became unavailable. Nothing works now :( Screenshot_20240323_160027_Home Assistant

oat1 commented 3 months ago

I had to came back to version 1.3.4 to make them work again

sanjoyg commented 3 months ago

Oh… can u attach the debug log as well. Need to see what is causing it

On Sat, 23 Mar 2024 at 20:37, oat1 @.***> wrote:

I had to came back to version 1.3.4 to make them work again

— Reply to this email directly, view it on GitHub https://github.com/sanjoyg/dirigera_platform/issues/19#issuecomment-2016519797, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2X3CQ4JP2VQVOA67K3ZZLYZWLD3AVCNFSM6AAAAABFDL6IDOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWGUYTSNZZG4 . You are receiving this because you were mentioned.Message ID: @.***>

oat1 commented 3 months ago

`Rejestrator: homeassistant.components.light Źródło: helpers/entity_platform.py:576 integracja: Światło (dokumentacja, Problemy) Pierwsze zdarzenie: 16:14:32 (5 zdarzenia) Ostatnio zalogowany: 16:14:32

Error adding entity light.swiatlo_4 for domain light with platform dirigera_platform Error adding entity light.swiatlo_7 for domain light with platform dirigera_platform Error adding entity light.swiatlo_5 for domain light with platform dirigera_platform Error adding entity light.swiatlo_6 for domain light with platform dirigera_platform Error adding entity light.swiatlo_2 for domain light with platform dirigera_platform Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 576, in _async_add_entities await coro File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 865, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1328, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 992, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1113, in _async_write_ha_state state, attr, capabilities, shadowed_attr = self.async_calculate_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1052, in async_calculate_state attr.update(self.state_attributes or {}) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 1201, in state_attributes if color_mode in COLOR_MODES_BRIGHTNESS: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: unhashable type: 'list' Rejestrator: homeassistant.components.sensor Źródło: helpers/entity_platform.py:576 integracja: Sensor (dokumentacja, Problemy) Pierwsze zdarzenie: 16:14:33 (1 zdarzenia) Ostatnio zalogowany: 16:14:33

Error adding entity None for domain sensor with platform dirigera_platform Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 576, in _async_add_entities await coro File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 725, in _async_add_entity device = dev_reg.async_get(self.hass).async_get_or_create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: homeassistant.helpers.device_registry.DeviceRegistry.async_get_or_create() argument after ** must be a mapping, not SensorDeviceClass `

sanjoyg commented 3 months ago

Thank you.. am on the road so unable to test with real device. Pushed a release please do try it

oat1 commented 3 months ago

Thank you for your involvement :)

After installing vers 1.3.4.2 Lights are working again but I get now a new error

`Rejestrator: homeassistant.components.sensor Źródło: helpers/entity_platform.py:576 integracja: Sensor (dokumentacja, Problemy) Pierwsze zdarzenie: 16:37:05 (1 zdarzenia) Ostatnio zalogowany: 16:37:05

Error adding entity None for domain sensor with platform dirigera_platform Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 576, in _async_add_entities await coro File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 725, in _async_add_entity device = dev_reg.async_get(self.hass).async_get_or_create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: homeassistant.helpers.device_registry.DeviceRegistry.async_get_or_create() argument after ** must be a mapping, not SensorDeviceClass `

Also below did not change:

`Rejestrator: homeassistant.components.light Źródło: components/light/init.py:1165 integracja: Światło (dokumentacja, Problemy) Pierwsze zdarzenie: 16:37:05 (7 zdarzenia) Ostatnio zalogowany: 16:37:05

None (<class 'custom_components.dirigera_platform.light.ikea_bulb'>) sets invalid supported color modes [<ColorMode.BRIGHTNESS: 'brightness'>, <ColorMode.COLOR_TEMP: 'color_temp'>], this will stop working in Home Assistant Core 2025.3, please create a bug report at https://github.com/sanjoyg/dirigera_platform`

``

oat1 commented 3 months ago

@sanjoyg I read the documentation and maybe the problem is with this : To each light, You have added two supported_color_modes: brightness, color_temp image

But according to documentation, if you allow ColorMode.BRIGHTNESS , This mode must be the only supported mode if supported by the light.

image

I think that maybe only allowing supported_color_modes: color_temp could resolve the issue This mode supports dimming and color temperature All of my Ikea bulbs are CCT

sanjoyg commented 3 months ago

Thank you , made the change as per that. Do have try it.

oat1 commented 3 months ago

It helped ! I don't see this error any more :)

Just this one remains

`Rejestrator: homeassistant.components.sensor Źródło: helpers/entity_platform.py:576 integracja: Sensor (dokumentacja, Problemy) Pierwsze zdarzenie: 07:53:33 (1 zdarzenia) Ostatnio zalogowany: 07:53:33

Error adding entity None for domain sensor with platform dirigera_platform Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 576, in _async_add_entities await coro File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 725, in _async_add_entity device = dev_reg.async_get(self.hass).async_get_or_create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: homeassistant.helpers.device_registry.DeviceRegistry.async_get_or_create() argument after ** must be a mapping, not SensorDeviceClass `

sanjoyg commented 3 months ago

This one is wierd. can you enable debug and push some lines before and after this error

oat1 commented 3 months ago

@sanjoyg Problem appears just once, after rebooting of the system. During usage I did not noticed it. But every reboot it reappears

Attaching the screenshot Screenshot_20240324_150136_Home Assistant

oat1 commented 3 months ago

I also have this type of remote added to dirigera gateway. Maybe it is not capable of adding it to Home Assistant. And that is why error appears Screenshot_20240324_212451

sanjoyg commented 3 months ago

Try the new release, it add debug statement. Do paste the debug log similar to what you pasted earlier that will help resolve the issue

oat1 commented 3 months ago

@sanjoyg 2024-03-25 07:00:47.919 DEBUG (MainThread) [custom_components.dirigera_platform] Found 0 outlet entities to setup... 2024-03-25 07:00:47.919 DEBUG (MainThread) [custom_components.dirigera_platform] SWITCH Complete async_setup_entry 2024-03-25 07:00:47.919 DEBUG (MainThread) [custom_components.dirigera_platform] ikea_controller ctor... 2024-03-25 07:00:47.919 DEBUG (MainThread) [custom_components.dirigera_platform] Found 0 env devices to setup... 2024-03-25 07:00:47.919 DEBUG (MainThread) [custom_components.dirigera_platform] Found 0 env entities to setup... 2024-03-25 07:00:47.919 DEBUG (MainThread) [custom_components.dirigera_platform] Found 1 controller devices to setup... 2024-03-25 07:00:47.919 DEBUG (MainThread) [custom_components.dirigera_platform] [] 2024-03-25 07:00:47.919 DEBUG (MainThread) [custom_components.dirigera_platform] [<entity unknown.unknown=unknown>] 2024-03-25 07:00:47.919 ERROR (MainThread) [homeassistant.components.sensor] Error adding entity None for domain sensor with platform dirigera_platform Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 576, in _async_add_entities await coro File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 725, in _async_add_entity device = dev_reg.async_get(self.hass).async_get_or_create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: homeassistant.helpers.device_registry.DeviceRegistry.async_get_or_create() argument after ** must be a mapping, not SensorDeviceClass 2024-03-25 07:00:47.921 DEBUG (MainThread) [custom_components.dirigera_platform] EnvSensor & Controllers Complete async_setup_entry 2024-03-25 07:00:47.921 DEBUG (MainThread) [custom_components.dirigera_platform] Found 0 motion_sensor entities to setup... 2024-03-25 07:00:47.921 DEBUG (MainThread) [custom_components.dirigera_platform] Found 0 open close entities to setup... 2024-03-25 07:00:47.921 DEBUG (MainThread) [custom_components.dirigera_platform] Binary Sensor Complete async_setup_entry

oat1 commented 3 months ago

and the json 2024-03-25 09:16:19.272 INFO (SyncWorker_7) [custom_components.dirigera_platform] === START Devices JSON === 2024-03-25 09:16:19.273 INFO (SyncWorker_7) [custom_components.dirigera_platform] -------------- 2024-03-25 09:16:19.577 INFO (SyncWorker_7) [custom_components.dirigera_platform] [{'id': 'd613d6b7-098e-4bdd-adff-16cc16aaf161_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:33.000Z', 'isReachable': False, 'lastSeen': '2024-03-24T19:01:44.000Z', 'attributes': {'customName': 'Światło 4', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': '680AE2FFFE11D61A', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': '33ce7f5e-e0f2-4f0a-9e7f-f77a805382a2_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T19:00:35.000Z', 'isReachable': False, 'lastSeen': '2024-03-25T07:07:36.000Z', 'attributes': {'customName': 'Światło 7', 'model': 'TRADFRI bulb GU10 WS 400lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'EC1BBDFFFE467F3F', 'productCode': 'LED1737R5GU10', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': '51349cda-556c-4d2c-a0f0-983a06699b84', 'name': 'Julia', 'color': 'ikea_pink_no_8', 'icon': 'rooms_play_area'}, 'deviceSet': [], 'remoteLinks': ['45a42119-2f56-4326-8b80-907af9b064f4_1'], 'isHidden': False}, {'id': 'c8c88287-41d6-407a-b087-fcea6f3b0332_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:31.000Z', 'isReachable': True, 'lastSeen': '2024-03-25T06:09:52.000Z', 'attributes': {'customName': 'Światło 3', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'CCCCCCFFFE3C7DEA', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': 'd9572831-60bc-4e89-8f03-2a3a3a24be31_1', 'relationId': 'd9572831-60bc-4e89-8f03-2a3a3a24be31', 'type': 'gateway', 'deviceType': 'gateway', 'createdAt': '2023-12-15T15:44:20.614Z', 'isReachable': True, 'lastSeen': '2024-03-25T08:16:00.153Z', 'attributes': {'customName': 'Dom', 'model': 'DIRIGERA Hub for smart products', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.521.6', 'hardwareVersion': 'P2.5', 'serialNumber': 'd9572831-60bc-4e89-8f03-2a3a3a24be31', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, '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': 'PL', 'userConsents': [{'name': 'analytics', 'value': 'enabled'}, {'name': 'diagnostics', 'value': 'enabled'}], 'logLevel': 3, 'coredump': False, 'timezone': 'Europe/Warsaw', 'nextSunSet': '2024-03-25T16:58:00.000Z', 'nextSunRise': '2024-03-26T04:25:00.000Z', 'homestateValue': 'home', 'homestateLastChanged': '2023-12-15T16:44:20+01:00', 'countryCode': 'XZ', 'coordinates': {'latitude': 52.306306306306304, 'longitude': 20.98133894019359, 'accuracy': -1}, 'isOn': False}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'permittingJoin', 'userConsents', 'logLevel', 'time', 'timezone', 'countryCode', 'coordinates']}, 'deviceSet': [], 'remoteLinks': []}, {'id': '36fee6ac-4395-44c2-acac-a0ef7a2c9cc0_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:22.000Z', 'isReachable': True, 'lastSeen': '2024-03-25T06:10:56.000Z', 'attributes': {'customName': 'Światło 1', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': '000D6FFFFE5ADEE7', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': 'b4a1385d-c3ac-491c-bde4-6b81733a0d47_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T19:00:31.000Z', 'isReachable': False, 'lastSeen': '2024-03-25T07:07:36.000Z', 'attributes': {'customName': 'Światło 5', 'model': 'TRADFRIbulbGU10WS345lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '1.0.012', 'hardwareVersion': '1', 'serialNumber': '9035EAFFFE30B3B8', 'productCode': 'LED2005R5', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': '51349cda-556c-4d2c-a0f0-983a06699b84', 'name': 'Julia', 'color': 'ikea_pink_no_8', 'icon': 'rooms_play_area'}, 'deviceSet': [], 'remoteLinks': ['45a42119-2f56-4326-8b80-907af9b064f4_1'], 'isHidden': False}, {'id': '45a42119-2f56-4326-8b80-907af9b064f4_1', 'type': 'controller', 'deviceType': 'lightController', 'createdAt': '2024-03-05T19:03:05.000Z', 'isReachable': True, 'lastSeen': '2024-03-25T00:16:05.000Z', 'attributes': {'customName': 'Pilot Julia', 'model': 'TRADFRI remote control', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '24.4.5', 'hardwareVersion': '1', 'serialNumber': 'EC1BBDFFFE8C6358', 'productCode': 'E1810', 'batteryPercentage': 40, 'isOn': False, 'lightLevel': 1, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00', 'circadianPresets': []}, 'capabilities': {'canSend': ['isOn', 'lightLevel'], 'canReceive': ['customName']}, 'room': {'id': '51349cda-556c-4d2c-a0f0-983a06699b84', 'name': 'Julia', 'color': 'ikea_pink_no_8', 'icon': 'rooms_play_area'}, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False}, {'id': '678aacf3-ceb1-46b4-8938-eb16634d25d6_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T19:00:31.000Z', 'isReachable': False, 'lastSeen': '2024-03-25T07:07:36.000Z', 'attributes': {'customName': 'Światło 6', 'model': 'TRADFRI bulb GU10 WS 400lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'CCCCCCFFFEDDF64C', 'productCode': 'LED1737R5GU10', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': '51349cda-556c-4d2c-a0f0-983a06699b84', 'name': 'Julia', 'color': 'ikea_pink_no_8', 'icon': 'rooms_play_area'}, 'deviceSet': [], 'remoteLinks': ['45a42119-2f56-4326-8b80-907af9b064f4_1'], 'isHidden': False}, {'id': '085bd163-c0b0-40a4-bb31-8091328d6ce3_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:30.000Z', 'isReachable': False, 'lastSeen': '2024-03-24T19:01:48.000Z', 'attributes': {'customName': 'Światło 2', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'CCCCCCFFFE3C7738', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}] 2024-03-25 09:16:19.578 INFO (SyncWorker_7) [custom_components.dirigera_platform] -------------- 2024-03-25 09:16:19.578 INFO (SyncWorker_7) [custom_components.dirigera_platform] === END Devices JSON ===

sanjoyg commented 3 months ago

Found the issue and have it fixed now in the latest release

sanjoyg commented 3 months ago

once resolve do close the issue

oat1 commented 3 months ago

confirm it is fixed thanks :)