ESP-MQTT-JSON-Digital-LEDs icon indicating copy to clipboard operation
ESP-MQTT-JSON-Digital-LEDs copied to clipboard

HA Automation question

Open pcdiks opened this issue 7 years ago • 2 comments

I'm trying to use a Xiaomi Cube to change the effect when I shake the cube. To do that, I created the following automation: `

  • id: ledstrip_shake alias: Xiaomi Cube - Shake initial_state: false hide_entity: true trigger:
    • platform: event event_type: cube_action event_data: entity_id: binary_sensor.cube_158d0001100c4e action_type: shake_air action:
    • service: light.turn_on entity_id: light.led_strip data: "effect": "solid" `

HA says that my config is valid, I can see the automation in the Automation Editor in the GUI as well. But it does not work. I think it has to do with the data part of the automation but I'm not sure. Could you give me some insights? The shaking part of the Xiaomi Cube is working by the way. I see the event in the logs but the action is not actived.

pcdiks avatar Jan 22 '18 14:01 pcdiks

I think the problem is entity_id is in the wrong position and the quotation marks, try removeing them and move entity_id inside "data". My automations works just fine.

    - service: light.turn_on
      data: 
        entity_id: light.ledstripnamehere
        brightness: 255
        effect: solid
        color_name: red

Rawet avatar Jan 24 '18 15:01 Rawet

Do you jave anything that changes Initial-state: false to true? This is basically switching off the automation. I had that very problem recently.

seamus65 avatar Jan 31 '18 07:01 seamus65