Hi,
I think this is the correct configuration:
Could someone please try it?
Now I don’t have any shelly to try it…
substitutions:
devicename: shelly1
esphome:
name: ${devicename}
platform: ESP8266
board: esp01_1m
wifi:
ssid: "xx"
password: "xxxxx"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Shelly Hotspot (xxxx)"
password: "xxxx"
web_server:
port: 80
captive_portal:
# Enable logging
logger:
level: INFO
# Enable Home Assistant API
api:
password: "xxxxxx"
ota:
password: "xxxxxx"
i2c:
sda: GPIO12
scl: GPIO14
sensor:
- platform: ade7953
voltage:
name: ${devicename} Voltage
current_a:
name: ${devicename} Current B
current_b:
name: ${devicename} Current A
active_power_a:
name: ${devicename} Active Power B
filters:
- multiply: -1
active_power_b:
name: ${devicename} Active Power A
filters:
- multiply: -1
update_interval: 60s
# NTC Temperature
- platform: ntc
sensor: temp_resistance_reading
name: ${devicename} Temperature
unit_of_measurement: "°C"
accuracy_decimals: 1
icon: "mdi:thermometer"
calibration:
b_constant: 3350
reference_resistance: 10kOhm
reference_temperature: 25C
- platform: resistance
id: temp_resistance_reading
sensor: temp_analog_reading
configuration: DOWNSTREAM
resistor: 32kOhm
- platform: adc
id: temp_analog_reading
pin: A0
update_interval: 10s
status_led:
pin:
number: GPIO0
inverted: yes
binary_sensor:
- platform: gpio
pin:
number: GPIO13
name: ${devicename} Switch1
on_press:
then:
- switch.toggle: shelly_relay_1
- platform: gpio
pin:
number: GPIO5
name: ${devicename} Switch2
on_press:
then:
- switch.toggle: shelly_relay_2
switch:
- platform: gpio
id: shelly_relay_1
name: ${devicename} Relay1
pin: GPIO15
icon: "mdi:electric-switch"
restore_mode: RESTORE_DEFAULT_OFF
- platform: gpio
id: shelly_relay_2
name: ${devicename} Relay2
pin: GPIO4
icon: "mdi:electric-switch"
restore_mode: RESTORE_DEFAULT_OFF
Thank you