On my code I am using several global variables and they work fine. However, when I am trying to use a global variable on the code below it doesn’t like it.
globals:
- id: seconds_to_turn
type: float
restore_value: yes
initial_value: '2'
sensor:
- platform: ultrasonic
name: Obtacle Clearance
id: ultrasonic_sensor1
trigger_pin: GPIO05
echo_pin: GPIO018
update_interval:
seconds: !lambda 'return id(seconds_to_turn);'
filters:
filter_out: nan
timeout: 9m