Syntax help

Hi,

This automation doesn’t seem to work, and the front end is reporting invalid config.

Any thoughts? I’ve fiddled with it for quite a while - clearly I’m missing something!

- alias: Light Dark Day
  trigger:
    platform: numeric_state
    entity_id: sensor.solar
    below: 500
  condition:
    condition: time
    after: '05:30:00'
    before: '17:30:00'
  action:
    service: switch.turn_on
    entity_id: switch.lounge

And this is the sensor definition itself which has been working fine for ages.

- platform: scrape
    resource: "http://pvoutput.org/intraday.jsp?id=xxxxxxxxx"
    name: Solar
    select: '#dashPowerOut'
    unit_of_measurement: 'W'
    value_template: '{{ value.replace(",", "") }}'

It should give you more info after “invalid config”

The automation syntax is fine - I suspect it has to do with the sensor and numeric_state, but that’s a guess. It’s either that, or the service you’re calling.

I put your automation in my system like this (I had to adapt the sensor and action, but I copied and pasted your syntax):

- alias: Light Dark Day
  trigger:
    platform: numeric_state
    entity_id: sensor.aeotec_zw100_multisensor_6_temperature_9_1
    below: 30
  condition:
    condition: time
    after: '05:30:00'
    before: '17:30:00'
  action:
    service: homeassistant.turn_on
    entity_id: switch.ge_12722_onoff_relay_switch_switch_4_0

It loads just fine.

Check https://home-assistant.io/getting-started/troubleshooting-configuration/#my-component-does-not-show-up