Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106084

Z2M - Tradfri without action property? Latest updates

$
0
0

After I updated today HO AND Z2M to the latest configuration I dont get the _action entity anymore for my ikea tradfri 5 button sensor. Any idea? I only see battery…

The automation complains " Error in describing trigger: e is undefined"

If i’m checking my entity I can’t find any name**_action**

Here’s my automation:

alias: 0_living_light_button_plastic_automation
description: ikea button
triggers:
  - entity_id: sensor.0_living_light_button_plastic_action
    to:
      - toggle
      - toggle_hold
      - brightness_up_click
      - brightness_down_click
      - arrow_left_click
      - arrow_right_click
      - brightness_up_hold
      - brightness_down_hold
      - arrow_left_hold
      - arrow_right_hold
      - brightness_up_release
      - brightness_down_release
      - arrow_left_release
      - arrow_right_release
    trigger: state
actions:
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.state == \"toggle\" }}"
        sequence:
          - target:
              entity_id:
                - light.0_living_light_front
                - light.0_living_light_right
                - light.0_living_light_left
                - light.0_living_lights_tv
            action: light.toggle
            data: {}
          - action: switch.toggle
            metadata: {}
            data: {}
            target:
              entity_id: switch.0_living_steckdose_lampe
            enabled: false
      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.state == \"brightness_up_click\" }}"
        sequence:
          - target:
              entity_id:
                - light.0_living_light_front
                - light.0_living_light_right
                - light.0_living_light_left
                - light.0_living_lights_tv
            data:
              brightness_step_pct: 20
              transition: 0.5
            action: light.turn_on
      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.state == \"brightness_down_click\" }}"
        sequence:
          - target:
              entity_id:
                - light.0_living_light_front
                - light.0_living_light_right
                - light.0_living_light_left
                - light.0_living_lights_tv
            data:
              brightness_step_pct: -20
              transition: 0.5
            action: light.turn_on
      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.state == \"arrow_left_click\" }}"
        sequence:
          - target:
              entity_id:
                - light.0_living_light_front
                - light.0_living_light_right
                - light.0_living_light_left
                - light.0_living_lights_tv
            data:
              color_temp: >-
                {% if state_attr(var_light_entities.entity_id[0], "color_temp")
                - 18 < 153 %}
                  {{ 153 }}
                {% else %}
                  {{ state_attr(var_light_entities.entity_id[0], "color_temp") - 18 }}
                {% endif %}
              transition: 0.5
            action: light.turn_on
      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.state == \"arrow_right_click\" }}"
        sequence:
          - target:
              entity_id:
                - light.0_living_light_front
                - light.0_living_light_right
                - light.0_living_light_left
                - light.0_living_lights_tv
            data:
              color_temp: >-
                {% if state_attr(var_light_entities.entity_id[0], "color_temp")
                + 18 > 500 %}
                  {{ 500 }}
                {% else %}
                  {{ state_attr(var_light_entities.entity_id[0], "color_temp") + 18 }}
                {% endif %}
              transition: 0.5
            action: light.turn_on
      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.state == \"toggle_hold\" }}"
        sequence:
          - target:
              entity_id:
                - light.0_living_light_front
                - light.0_living_light_right
                - light.0_living_light_left
                - light.0_living_lights_tv
            data:
              brightness: 254
              color_temp: 400
            action: light.turn_on
          - action: switch.turn_on
            metadata: {}
            data: {}
            target:
              entity_id: switch.0_living_steckdose_lampe
            enabled: false
      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.state == \"brightness_up_hold\" }}"
        sequence:
          - repeat:
              while: []
              sequence:
                - target:
                    entity_id:
                      - light.0_living_light_front
                      - light.0_living_light_right
                      - light.0_living_light_left
                      - light.0_living_lights_tv
                  data:
                    brightness_step_pct: 10
                    transition: 0.5
                  action: light.turn_on
                - delay:
                    milliseconds: 500
      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.state == \"brightness_down_hold\" }}"
        sequence:
          - repeat:
              while: []
              sequence:
                - target:
                    entity_id:
                      - light.0_living_light_front
                      - light.0_living_light_right
                      - light.0_living_light_left
                      - light.0_living_lights_tv
                  data:
                    brightness_step_pct: -10
                    transition: 0.5
                  action: light.turn_on
                - delay:
                    milliseconds: 500
      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.state == \"arrow_left_hold\" }}"
        sequence:
          - repeat:
              while: []
              sequence:
                - target:
                    entity_id:
                      - light.0_living_light_front
                      - light.0_living_light_right
                      - light.0_living_light_left
                      - light.0_living_lights_tv
                  data:
                    color_temp: >-
                      {% if state_attr(var_light_entities.entity_id[0],
                      "color_temp") - 18 < 153 %}
                        {{ 153 }}
                      {% else %}
                        {{ state_attr(var_light_entities.entity_id[0], "color_temp") - 18 }}
                      {% endif %}
                    transition: 0.5
                  action: light.turn_on
                - delay:
                    milliseconds: 500
      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.state == \"arrow_right_hold\" }}"
        sequence:
          - repeat:
              while: []
              sequence:
                - target:
                    entity_id:
                      - light.0_living_light_front
                      - light.0_living_light_right
                      - light.0_living_light_left
                      - light.0_living_lights_tv
                  data:
                    color_temp: >-
                      {% if state_attr(var_light_entities.entity_id[0],
                      "color_temp") + 18 > 500 %}
                        {{ 500 }}
                      {% else %}
                        {{ state_attr(var_light_entities.entity_id[0], "color_temp") + 18 }}
                      {% endif %}
                    transition: 0.5
                  action: light.turn_on
                - delay:
                    milliseconds: 500
    default: []
mode: restart
variables:
  var_light_entities:
    entity_id:
      - light.0_living_light_front
      - light.0_living_light_right
      - light.0_living_light_left
      - light.0_living_lights_tv

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 106084

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>