ioBroker/ioBroker.lovelace

Devices werden in der room-card immer als on angezeigt

Closed this issue · 1 comments

Describe the bug
Devices werden in der room-card immer als on angezeigt

To Reproduce
type: custom:room-card

  • entity: light.Tv_led
    name: TV
    show_icon: true
    state_color: true
    show_state: false
    icon: mdi:television-ambient-light
    tap_action:
    action: toggle
    double_tap_action:
    action: more-info

Expected behavior
Wenn light.Tv_led sollte das Icon grau sein
im eingeschalteten Zustand wird die eingestellte Farbe angezeigt, so in der 3.0.x Version
In der 4.1.2 wir egal ob das Device eingeschaltet ist oder nicht immer die eingestellte Farbe angezeigt.

Screenshots & Logfiles

Versions:

  • Adapter version: 4.1.2
  • JS-Controller version: 5.0.19
  • Node version: v18.17.1
  • Operating system: Docker

Additional context

Sadly this is quite a complex issue... it seems HomeAssistant sets all attributes to null on switch off. I implemented that in iobroker, too. But that leads to the issue, that those attributes stay null until they are updated again in ioBroker... so I added code to read the attributes on switch on again. This currently borks up some tests, because the timing is quite difficult. Probably that won't lead to issues in real live, but it might... let's see.