# Group.Light current state

**URL:** <https://discourse.nodered.org/t/group-light-current-state/24601>\
**Category:** General\
**Created:** [10 April 2020 18:09 UTC](https://discourse.nodered.org/t/group-light-current-state/24601 "2020-04-10T18:09:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Merwenus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/merwenus/32/41604_2.png) [@Merwenus](https://discourse.nodered.org/u/Merwenus)\
**Post date:** [10 April 2020 18:09 UTC](https://discourse.nodered.org/t/group-light-current-state/24601/1 "2020-04-10T18:09:05Z")

</div>

Hello,

Started to move from YAML to Node-Red couple a days ago, and I bumped into something I can't resolve, but it looks so easy, yet it does not work for me.  
I want to use a group of lights from Home Assistant to determine turn off or ON, but in the debug I get Xiaomi\_aqara.click off in the end (instead of group.light on/off).

Xiaomi switch -\> Single Click -\> Group.light current state (from HA) -\> Turn OFF or ON.

[Sequence pastebin](https://pastebin.com/MP4N98Zg)

 ![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/e/2ec9fc12dd3bfe4f54b971ea1b39d476ad5b6242.png)

This is the YAML code I'm using right now and what I want to implement to Node-RED

```auto
- alias: Étkező Lámpa - Single
  trigger:
    platform: event
    event_type: xiaomi_aqara.click
    event_data:
      entity_id: binary_sensor.switch_158d00016c0a97
      click_type: single
  action:
    service_template: >
      {% if is_state('group.light_etkezo','off') %}
        homeassistant.turn_on
      {% else %}
        homeassistant.turn_off
      {% endif %}
    entity_id: group.light_etkezo

```

What am I missing?

---

<div class="post-metadata">

**Author:** ![Merwenus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/merwenus/32/41604_2.png) [@Merwenus](https://discourse.nodered.org/u/Merwenus)\
**Post date:** [10 April 2020 19:59 UTC](https://discourse.nodered.org/t/group-light-current-state/24601/2 "2020-04-10T19:59:30Z")

</div>

Oh found out it is a known bug, since 2018. But got a solution here:

> <https://github.com/zachowj/node-red-contrib-home-assistant-websocket/issues/124>
>
> Describe the bug
> After updating to version 0.11.0, all my current flows that are using the "Current State" node aren't working anymore....

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [9 June 2020 20:09 UTC](https://discourse.nodered.org/t/group-light-current-state/24601/3 "2020-06-09T20:09:13Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
