Hi, All,
So I have this yaml code on ESPHome 2024.6.2, which was working fine on 2022.3.1, but now I am always getting an error when trying to update the device:
ERROR Circular dependency detected! Please run with -v option to see what functions failed to complete.
Here is the actual yaml file:
esphome:
name: roomba-garage
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
services:
- service: control_servo
variables:
level: float
then:
- servo.write:
id: servo_right
level: !lambda 'return level / 100.0;'
- servo.write:
id: servo_left
level: !lambda 'return level / -100.0;'
ota:
- platform: esphome
password: "secret_pass"
safe_mode:
num_attempts: 3
disabled: true
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Roomba-Garage Fallback Hotspot"
password: "fallback_password"
captive_portal:
# Sync time with Home Assistant.
time:
- platform: homeassistant
id: homeassistant_time
globals:
- id: roomba_garage_door
type: bool
restore_value: no
initial_value: 'false'
#binary_sensor:
# - platform: gpio
# pin: D8
# name: "Vacuum garage door button"
# on_press:
# then:
# - switch.turn_on: vaccum_garage_door
# on_release:
# then:
# - switch.turn_off: vaccum_garage_door
switch:
- platform: template
name: "Roomba Garage Door"
id: roomba_kitchen_garage_door
restore_mode: DISABLED
turn_on_action:
- servo.write:
id: servo_right
level: 100%
- servo.write:
id: servo_left
level: -100%
- globals.set:
id: roomba_garage_door
value: 'true'
turn_off_action:
- servo.write:
id: servo_right
level: -10%
- servo.write:
id: servo_left
level: 10%
- globals.set:
id: roomba_garage_door
value: 'false'
lambda: return id(roomba_garage_door).state;
servo:
- id: servo_right
output: pwm_output_right
restore: true
transition_length: 2s
- id: servo_left
output: pwm_output_left
restore: true
transition_length: 2s
output:
- platform: esp8266_pwm
id: pwm_output_right
pin: GPIO4
frequency: 50 Hz
- platform: esp8266_pwm
id: pwm_output_left
pin: GPIO5
frequency: 50 Hz
Can someone please guide me on what am I missing?
Thanks