Philips HUE dimmer switch

Tags: #<Tag:0x00007f78000c9a70>

You can subscribe to specific events in developer tools -> events, I think you should subscribe to zha_event

1 Like

SHould I see zha_event as an option here

No, you have to subscribe to it

OK so I’ve got it all working. I’m just using the on and off commands and the moment but am trying to think about the best ways to possibly use the dimmer buttons

when you just press the up dimmer you get this

{
    "event_type": "zha_event",
    "data": {
        "unique_id": "0x212b:1:0x0008",
        "device_ieee": "00:17:88:01:02:d4:35:36",
        "command": "step",
        "args": [
            0,
            30,
            9
        ]
    },

If you press and hold the up dimmer you get this for a button

{
    "event_type": "zha_event",
    "data": {
        "unique_id": "0x212b:1:0x0008",
        "device_ieee": "00:17:88:01:02:d4:35:36",
        "command": "step",
        "args": [
            0,
            56,
            9
        ]
    },

and then when you let go you get

{
    "event_type": "zha_event",
    "data": {
        "unique_id": "0x212b:1:0x0008",
        "device_ieee": "00:17:88:01:02:d4:35:36",
        "command": "stop",
        "args": []
    },

Not sure if using the STOP command would offer any benefit in an automation or not.

Here is my basic on/off automations

- alias: Remote Control Kitchen Cabinet Lights On
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:d4:35:36"
      command: "on"
  action:
  - service: scene.turn_on
    entity_id: scene.kitchen_cabinets_on

- alias: Remote Control Kitchen Cabinet Lights Off
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:d4:35:36"
      command: "off_with_effect"
  action:
  - service: scene.turn_on
    entity_id: scene.kitchen_cabinets_off

Working on a couple automations and scripts for the hue dimmer, which I’ll share when done. I have a quick yaml question about the args: and how to handle it in my trigger/automation

I’m posting this without acually being at my HA system, so it could work, but was wondering if anyone had any experience about the proper formatting for args:

This would be just a push UPDATE; TESTED AND THIS WORKS

- alias: Shelf Lights Increase Brightness
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "your ieee here"
      command: "step"
      args: [0, 30, 9]
  action:
  - service: light.turn_on
    data_template:
      entity_id: light.shelf_only_color_lights
      brightness: >
          {% if state_attr('light.shelf_only_color_lights' , 'brightness') < 230 %}
            {{ state_attr('light.shelf_only_color_lights' , 'brightness') + 25 }}
          {% else %} 255 {% endif %}
- alias: Shelf Lights Decrease Brightness
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "your ieer here"
      command: "step"
      args: [1, 30, 9]
  action:
  - service: light.turn_on
    data_template:
      entity_id: light.shelf_only_color_lights
      brightness: >
          {% if state_attr('light.shelf_only_color_lights' , 'brightness') > 25 %}
            {{ state_attr('light.shelf_only_color_lights' , 'brightness') - 25 }}
          {% else %} 1 {% endif %}

For press and hold - Tested working

- alias: Shelf Lights Increase Brightness
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "your ieer here"
      command: "step"
      args: [0, 56, 9]
  action:
  - service: script.turn_on
    entity_id: script.increment_light

- alias: Shelf Lights Decrease Brightness
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "your ieer here"
      command: "step"
      args: [1, 56, 9]
  action:
  - service: script.turn_on
    entity_id: script.decrement_light

- alias: Shelf Lights Stop scripts
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "your ieer here"
      command: "stop"
  action:
  - service: script.turn_off
    entity_id: script.increment_light
  - service: script.turn_off
    entity_id: script.decrement_light```
and the scripts

Scripts - Tested working

increment_light:
  alias: Shelf Lights Dim
  sequence:
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') < 230 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') + 25 }}
         {% else %} 255 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') < 230 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') + 25 }}
         {% else %} 255 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') < 230 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') + 25 }}
         {% else %} 255 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') < 230 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') + 25 }}
         {% else %} 255 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') < 230 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') + 25 }}
         {% else %} 255 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') < 230 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') + 25 }}
         {% else %} 255 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') < 230 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') + 25 }}
         {% else %} 255 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') < 230 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') + 25 }}
         {% else %} 255 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') < 230 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') + 25 }}
         {% else %} 255 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') < 230 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') + 25 }}
         {% else %} 255 {% endif %}

decrement_light:
  alias: Shelf Lights Brighten
  sequence:
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') > 25 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') - 25 }}
         {% else %} 1 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') > 25 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') - 25 }}
         {% else %} 1 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') > 25 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') - 25 }}
         {% else %} 1 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') > 25 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') - 25 }}
         {% else %} 1 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') > 25 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') - 25 }}
         {% else %} 1 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') > 25 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') - 25 }}
         {% else %} 1 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') > 25 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') - 25 }}
         {% else %} 1 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') > 25 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') - 25 }}
         {% else %} 1 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') > 25 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') - 25 }}
         {% else %} 1 {% endif %}
    - delay: 00:00:01
    - service: light.turn_on
      entity_id: light.shelf_only_color_lights
      data_template:
        brightness: >
         {% if state_attr('light.shelf_only_color_lights' , 'brightness') > 25 %}
           {{ state_attr('light.shelf_only_color_lights' , 'brightness') - 25 }}
         {% else %} 1 {% endif %}

The args above is what seems to come up with a button press (not hold). If this works, then I’ll set up another automation for the hold, that runs a brightness increase/decrease script and then stops the script when the zha_event command is “stop”

UPDATE: This works, for using the dimmer buttons as a dimmer. I created a light group for two hue lights, but I expect it work with any lights.

2 Likes

I feel like one thing that kept me on the Hue ecosystem was the ability to do cool things like color loop and the ability to dim lights with the dimmer.
These automations have worked for me I borrowed some of the yaml from other posts.

- alias: Remote Control Shelf Lights On
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:1a:82:21"
      command: "on"
  action:
  - service: scene.turn_on
    entity_id: scene.shelf_lights_on

- alias: Remote Control Shelf Lights On
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:1a:82:21"
      command: "off_with_effect"
  action:
  - service: scene.turn_on
    entity_id: scene.shelf_lights_off

- alias: Remote Control Kitchen Cabinet Lights On
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:d4:35:36"
      command: "on"
  action:
  - service: scene.turn_on
    entity_id: scene.kitchen_cabinets_on

- alias: Remote Control Kitchen Cabinet Lights Off
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:d4:35:36"
      command: "off_with_effect"
  action:
  - service: scene.turn_on
    entity_id: scene.kitchen_cabinets_off

- alias: Shelf Lights Increase Brightness
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:1a:82:21"
      command: "step"
      args: [0, 30, 9]
  action:
  - service: light.turn_on
    data_template:
      entity_id: light.shelf_only_color_lights
      brightness: >
          {% if state_attr('light.shelf_only_color_lights' , 'brightness') < 230 %}
            {{ state_attr('light.shelf_only_color_lights' , 'brightness') + 25 }}
          {% else %} 255 {% endif %}
- alias: Shelf Lights Decrease Brightness
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:1a:82:21"
      command: "step"
      args: [1, 30, 9]
  action:
  - service: light.turn_on
    data_template:
      entity_id: light.shelf_only_color_lights
      brightness: >
          {% if state_attr('light.shelf_only_color_lights' , 'brightness') > 25 %}
            {{ state_attr('light.shelf_only_color_lights' , 'brightness') - 25 }}
          {% else %} 1 {% endif %}

- alias: Shelf Lights Increase Brightness
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:1a:82:21"
      command: "step"
      args: [0, 56, 9]
  action:
  - service: script.turn_on
    entity_id: script.increment_light

- alias: Shelf Lights Decrease Brightness
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:1a:82:21"
      command: "step"
      args: [1, 56, 9]
  action:
  - service: script.turn_on
    entity_id: script.decrement_light

- alias: Shelf Lights Stop scripts
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:1a:82:21"
      command: "stop"
  action:
  - service: script.turn_off
    entity_id: script.increment_light
  - service: script.turn_off
    entity_id: script.decrement_light

- alias: Color Loop All Downstairs
  initial_state: false
  trigger:
  - platform: time_pattern
    seconds: '/2'
  condition:
  - condition: numeric_state
    entity_id: sensor.ha_runtime_in_minutes
    above: 1
  action:
  - service: light.turn_on
    entity_id: light.downstairs_color_lights
    data_template:
      hs_color:
        - "{{ (12 + (state_attr('light.downstairs_color_lights', 'hs_color')[0] or 0)) % 360 }}"
        - 100
      brightness_pct: 100
      transition: 1

- alias: Color Loop Shelf Lights
  initial_state: false
  trigger:
  - platform: time_pattern
    seconds: '/2'
  condition:
  - condition: numeric_state
    entity_id: sensor.ha_runtime_in_minutes
    above: 1
  action:
  - service: light.turn_on
    entity_id: light.shelf_color_lights
    data_template:
      hs_color:
        - "{{ (12 + (state_attr('light.shelf_color_lights', 'hs_color')[0] or 0)) % 360 }}"
        - 100
      brightness_pct: 100
      transition: 1

- alias: Color Loop Living Room
  initial_state: false
  trigger:
  - platform: time_pattern
    seconds: '/2'
  condition:
  - condition: numeric_state
    entity_id: sensor.ha_runtime_in_minutes
    above: 1
  action:
  - service: light.turn_on
    entity_id: light.living_room_color_lights
    data_template:
      hs_color:
        - "{{ (12 + (state_attr('light.living_room_color_lights', 'hs_color')[0] or 0)) % 360 }}"
        - 100
      brightness_pct: 100
      transition: 1

- alias: Color Loop All Kitchen
  initial_state: false
  trigger:
  - platform: time_pattern
    seconds: '/2'
  condition:
  - condition: numeric_state
    entity_id: sensor.ha_runtime_in_minutes
    above: 1
  action:
  - service: light.turn_on
    entity_id: light.kitchen_color_lights
    data_template:
      hs_color:
        - "{{ (12 + (state_attr('light.kitchen_color_lights', 'hs_color')[0] or 0)) % 360 }}"
        - 100
      brightness_pct: 100
      transition: 1

- alias: Color Loop Kitchen Cabinets
  initial_state: false
  trigger:
  - platform: time_pattern
    seconds: '/2'

  condition:
  - condition: numeric_state
    entity_id: sensor.ha_runtime_in_minutes
    above: 1
  action:
  - service: light.turn_on
    entity_id: light.kitchen_cabinet_color_lights
    data_template:
      hs_color:
        - "{{ (12 + (state_attr('light.kitchen_cabinet_color_lights', 'hs_color')[0] or 0)) % 360 }}"
        - 100
      brightness_pct: 100
      transition: 1

and here is my light groups in a light.yaml file

- platform: group
  name: All Downstairs Color Lights
  entities:
    - light.left_shelf_lights
    - light.tv_backlights
    - light.right_shelf_lights
    - light.kitchen_cabinet_tops
    - light.kitchen_cabinet_bottoms
    - light.living_room_lamp_one
    - light.living_room_lamp_two
    - light.alcove_light
- platform: group
  name: Living Room Color Lights
  entities:
    - light.left_shelf_lights
    - light.tv_backlights
    - light.right_shelf_lights
    - light.living_room_lamp_one
    - light.living_room_lamp_two
- platform: group
  name: Kitchen Color Lights
  entities:
    - light.kitchen_cabinet_tops
    - light.kitchen_cabinet_bottoms
    - light.alcove_light
- platform: group
  name: Shelf Color Lights
  entities:
    - light.left_shelf_lights
    - light.tv_backlights
    - light.right_shelf_lights
- platform: group
  name: Shelf Only Color Lights
  entities:
    - light.left_shelf_lights
    - light.right_shelf_lights
- platform: group
  name: Kitchen Cabinet Color Lights
  entities:
    - light.kitchen_cabinet_tops
    - light.kitchen_cabinet_bottoms

Of course your light groups will vary, but the idea is the same. This work well. I’ll probaby set up another automation to turn on/off the color loops, but it could be set up with a dimmer as well. Enjoy

Hello !

The dimmer switch actually sends step commands repeatedly as long as you keep pressing the brightness buttons, only the args are different. Thus you don’t actually need scripts to handle the brightness as start/stop of events.

I’m using a ConBee II and the following shorter automations work perfect for me :

# Hue Dimmer Switch salon (00:17:88:01:02:d5:b7:f2)

- alias: Switch lights on in Salon
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:d5:b7:f2"
      command: "on"
  action:
  - service: light.turn_on
    entity_id: light.pied_bureau

- alias: Switch lights off in Salon
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:d5:b7:f2"
      command: "off_with_effect"
  action:
  - service: light.turn_off
    entity_id: light.pied_bureau

- alias: Increase brightness in Salon
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:d5:b7:f2"
      command: "step"
      args: [0, 30, 9]
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:d5:b7:f2"
      command: "step"
      args: [0, 56, 9]
  action:
  - service: light.turn_on
    data_template:
      entity_id: light.pied_bureau
      brightness: >
          {% if state_attr('light.pied_bureau' , 'brightness') < 230 %}
            {{ state_attr('light.pied_bureau' , 'brightness') + 25 }}
          {% else %} 255 {% endif %}

- alias: Decrease brightness in Salon
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:d5:b7:f2"
      command: "step"
      args: [1, 30, 9]
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: "00:17:88:01:02:d5:b7:f2"
      command: "step"
      args: [1, 56, 9]
  action:
  - service: light.turn_on
    data_template:
      entity_id: light.pied_bureau
      brightness: >
          {% if state_attr('light.pied_bureau' , 'brightness') > 25 %}
            {{ state_attr('light.pied_bureau' , 'brightness') - 25 }}
          {% else %} 1 {% endif %}

Thank a lot @ptdalen for the initial automations !! :slight_smile:

2 Likes

For reference for people using Node Red. I have the remote working with single, double, triple, and 4 tap configurations, as well as single tap and hold incr/decr brightness. The heavy lifting is all done inside the call service data section with JSONata for the logic.

Find my Flow below:

[{"id":"3d99f4a4.0746cc","type":"server-events","z":"4b320b95.36aee4","name":"ZHA Event","server":"e7d779a8.bab228","event_type":"zha_event","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":120,"y":640,"wires":[["42b796fa.1021c8"]]},{"id":"42b796fa.1021c8","type":"switch","z":"4b320b95.36aee4","name":"On/Off/Step","property":"payload.event.command","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off_with_effect","vt":"str"},{"t":"eq","v":"step","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":290,"y":640,"wires":[["1d7869af.d74fe6"],["5cb4eab9.40f864"],["f853924.2219e7"]]},{"id":"1d7869af.d74fe6","type":"timed-counter","z":"4b320b95.36aee4","name":"","timelimit":350,"timeunit":1,"withhold":true,"fixedtimeout":false,"pertopic":false,"x":520,"y":500,"wires":[["a48d0942.5ed8d8"]]},{"id":"5cb4eab9.40f864","type":"timed-counter","z":"4b320b95.36aee4","name":"","timelimit":350,"timeunit":1,"withhold":true,"fixedtimeout":false,"pertopic":false,"x":520,"y":640,"wires":[["6c39c10b.afef4"]]},{"id":"f853924.2219e7","type":"switch","z":"4b320b95.36aee4","name":"Type of Step","property":"payload.event","propertyType":"msg","rules":[{"t":"jsonata_exp","v":"msg.payload.event.args=[0,30,9]","vt":"jsonata"},{"t":"jsonata_exp","v":"msg.payload.event.args=[0,56,9]","vt":"jsonata"},{"t":"jsonata_exp","v":"msg.payload.event.args=[1,30,9]","vt":"jsonata"},{"t":"jsonata_exp","v":"msg.payload.event.args=[1,56,9]","vt":"jsonata"}],"checkall":"true","repair":false,"outputs":4,"x":510,"y":880,"wires":[["476e8a84.a189a4","a3ef5fa1.d47ba"],["476e8a84.a189a4","a3ef5fa1.d47ba"],["8973ea79.aa50d8","7015d5da.676d7c"],["8973ea79.aa50d8","7015d5da.676d7c"]]},{"id":"a48d0942.5ed8d8","type":"switch","z":"4b320b95.36aee4","name":"1/2/3 Taps","property":"count","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"3","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":690,"y":500,"wires":[["c1eec69d.ff3ea8"],["2ab5e284.5f8c3e"],["6f228a32.8b6404"]]},{"id":"6c39c10b.afef4","type":"switch","z":"4b320b95.36aee4","name":"1/2/3/4+ Taps","property":"count","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"3","vt":"num"},{"t":"gte","v":"4","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":700,"y":640,"wires":[["61b125d6.8077dc"],["c24eeb94.515f38"],["c470b1ec.771b6"],["cf34c612.079148"]]},{"id":"476e8a84.a189a4","type":"api-call-service","z":"4b320b95.36aee4","name":"MBR Ceiling Lights Brightness Incr","server":"e7d779a8.bab228","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.master_bedroom_ceiling_lights","data":"{\t   \"brightness\": (\t       $entities(\"light.master_bedroom_ceiling_lights\").state = \"on\"\t   ) ? $min(\t       [\t           $entities(\"light.master_bedroom_ceiling_lights\").attributes.brightness + 25,\t           255\t       \t       ]\t   \t   ):0\t\t\t}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1000,"y":820,"wires":[[]]},{"id":"a3ef5fa1.d47ba","type":"api-call-service","z":"4b320b95.36aee4","name":"MBR Lamps Brightness Incr","server":"e7d779a8.bab228","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.master_bedroom_lamps","data":"{\t   \"brightness\": ($entities(\"light.master_bedroom_lamps\").state = \"on\") ? $min(\t       [\t           $entities(\"light.master_bedroom_lamps\").attributes.brightness + 25,\t           255\t       ]\t   ):0\t\t}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":980,"y":860,"wires":[[]]},{"id":"8973ea79.aa50d8","type":"api-call-service","z":"4b320b95.36aee4","name":"MBR Ceiling Lights Brightness Dec","server":"e7d779a8.bab228","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.master_bedroom_ceiling_lights","data":"{\t   \"brightness\": (\t       $entities(\"light.master_bedroom_ceiling_lights\").state = \"on\"\t   ) ? $max(\t       [\t           $entities(\"light.master_bedroom_ceiling_lights\").attributes.brightness - 25,\t           0\t       \t       ]\t   \t   ):0\t\t\t}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1000,"y":920,"wires":[[]]},{"id":"7015d5da.676d7c","type":"api-call-service","z":"4b320b95.36aee4","name":"MBR Lamps Brightness Incr","server":"e7d779a8.bab228","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.master_bedroom_lamps","data":"{\t   \"brightness\": ($entities(\"light.master_bedroom_lamps\").state = \"on\") ? $max(\t       [\t           $entities(\"light.master_bedroom_lamps\").attributes.brightness - 25,\t           0\t       ]\t   ):0\t\t}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":980,"y":960,"wires":[[]]},{"id":"c1eec69d.ff3ea8","type":"api-call-service","z":"4b320b95.36aee4","name":"MBR Lamp Lights On","server":"e7d779a8.bab228","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.master_bedroom_lamps","data":"{\"brightness\": 255}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":960,"y":440,"wires":[[]]},{"id":"2ab5e284.5f8c3e","type":"api-call-service","z":"4b320b95.36aee4","name":"MBR Lights On","server":"e7d779a8.bab228","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.master_bedroom","data":"{\"brightness\": 255}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":940,"y":500,"wires":[[]]},{"id":"6f228a32.8b6404","type":"api-call-service","z":"4b320b95.36aee4","name":"MBR Ceiling Lights On","server":"e7d779a8.bab228","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.master_bedroom_ceiling_lights","data":"{\"brightness\": 255}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":960,"y":560,"wires":[[]]},{"id":"61b125d6.8077dc","type":"api-call-service","z":"4b320b95.36aee4","name":"MBR Lamp Lights Off","server":"e7d779a8.bab228","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.master_bedroom_lamps","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":960,"y":600,"wires":[[]]},{"id":"c24eeb94.515f38","type":"api-call-service","z":"4b320b95.36aee4","name":"MBR Lights Off","server":"e7d779a8.bab228","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.master_bedroom","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":940,"y":660,"wires":[[]]},{"id":"c470b1ec.771b6","type":"api-call-service","z":"4b320b95.36aee4","name":"MBR Ceiling Lights Off","server":"e7d779a8.bab228","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.master_bedroom_ceiling_lights","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":960,"y":720,"wires":[[]]},{"id":"cf34c612.079148","type":"api-call-service","z":"4b320b95.36aee4","name":"All Lights Off","server":"e7d779a8.bab228","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"all","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":930,"y":780,"wires":[[]]},{"id":"e7d779a8.bab228","type":"server","z":"","name":"Home Assistant"}]

3 Likes