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

Automation 'expected a dictionary value'

$
0
0

@kuro8989 wrote:

Getting this error code

Invalid config for [automation]: expected a dictionary for dictionary value @ data['action'][0]['data_template']. Got None
extra keys not allowed @ data['action'][0]['brightness_pct']. Got None
extra keys not allowed @ data['action'][0]['hs_color']. Got None
extra keys not allowed @ data['action'][0]['transition']. Got None. (See /config/configuration.yaml, line 40). Please check the docs at https://home-assistant.io/integrations/automation/
Invalid config for [automation]: extra keys not allowed @ data['condition'][1]['state']. Got None
not a valid value for dictionary value @ data['condition'][1]['condition']. Got None. (See /config/configuration.yaml, line 40). Please check the docs at https://home-assistant.io/integrations/automation/
Invalid config for [automation]: extra keys not allowed @ data['condition'][1]['state']. Got None

The logs loop like that 10 more times but I can post the full log if one needs.

Here’s the automation page specifically line 36 - 56 just for context (also someone let me know if this isn’t necessary still super new to this).

- id: CC_livingroom_east
  alias: Color Change Living Room East
  trigger: 
    minutes: /120
    seconds: 0
    platform: time_pattern
  condition: 
    - condition: time
      after: "10:30:00"
      before: "03:00:00"
    - condition: state
      entity_id: light.1f_lc_living_room_east
      state: true        
  action:
      service: light.turn_on 
      data_template: 
        brightness_pct: 100
        hs_color: 
          - "{{ range(360)|random }}"
          - "{{ range(80,101)|random }}"
      entity_id: 'light.1f_lc_living_room_east' 

The automation is basically a light scheduler with an hourly random colour change. I will probably add a transition to each action as well.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95278

Trending Articles



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