I am attempting to replace a hard-coded value in an automation with a value from the secrets file, but I haven’t had a success getting the syntax correct. I have tried several solutions I have found in the forums, but I am obviously missing something since I keep getting some sort of ‘invalid’ / ‘not expected’ message.
condition:
- condition: state
entity_id: light.front_porch
state: 'off'
- condition: numeric_state
entity_id: sensor.hue_outdoor_motion_sensor_1_light_level
attribute: lightlevel
below: '22000' **<-trying to replace this with secret lightLevelMin**
- condition: time
after: '06:00:00'
before: '23:00:00'
condition:
- condition: state
entity_id: light.front_porch
state: 'off'
- condition: numeric_state
entity_id: sensor.hue_outdoor_motion_sensor_1_light_level
attribute: lightlevel
below: !secret light_level_min # do not use spaces, capital letters or other special characters.
- condition: time
after: '06:00:00'
before: '23:00:00'