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

Wrong automation

$
0
0

@maurizio53 wrote:

What is wrong in this automation as i always get this error when checking the config:

Invalid config for [automation]: extra keys not allowed @ data['condition'][0]['conditions'][0]['to']. Got None
not a valid value for dictionary value @ data['condition'][0]['conditions'][0]['condition']. Got None. (See /config/configuration.yaml, line 35). Please check the docs at https://home-assistant.io/integrations/automation/

This is the automation:

- alias: 'Accendi luci Salotto'
  trigger:
    platform: state
    entity_id: binary_sensor.motion_sensor_158d0001a98a62
    to: 'on'
  condition:
    condition: and
    conditions:  
      - condition: state
        entity_id: group.presenze
        to: 'not_home'
      - condition: template
        value_template: '{{ state_attr("sun.sun", "elevation") < 0.5}}'
      - condition: state
        entity_id: group.all_lights
        state: 'off'
      - condition: template
        value_template: '{{ (as_timestamp(now())-as_timestamp(states.input_boolean.mauhome.last_updated)) < 360 }}'
  action:  
    - service: light.turn_on
      entity_id:
        - light.yeelight_1
      data_template:
        brightness: 255
        rgb_color: ['{{ (range(0, 255)|random) }}','{{ (range(0, 255)|random) }}','{{ (range(0, 255)|random) }}']  
        transition: 10

Posts: 7

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 95513

Trending Articles



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