Hi,
I just discovered the thermostat integration in esphome and I’m moving all my custom arduino code to this. It’s much simpler and interfaces very nicely with HA. However, I’m having trouble setting a duty cycle for my thermostat. Basically, if the thermostat turns on heating, I want the relais to toggle ON/OFF in 5 min intervals. Ideally, this frequency can be set externally, but let’s not focus on this here.
This is my code:
esphome:
name: heating_livingroom
platform: ESP8266
board: huzzah
wifi:
ssid: "ssid"
password: "bla"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "bla"
password: "bla"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
password: "bla"
ota:
password: "bla"
sensor:
- platform: dht
pin: D13
temperature:
name: "Living Room Temperature TEST"
id: test_temp_livingroom
humidity:
name: "Living Room Humidity TEST"
id: test_hum_livingroom
update_interval: 60s
output:
# - platform: gpio
- platform: slow_pwm
pin: D15
id: 'generic_out'
period: 10s
switch:
- platform: output
name: "Generic Output"
id: heater
output: 'generic_out'
climate:
- platform: thermostat
name: living room thermostat
id: test_themostat_livingroom
sensor: test_temp_livingroom
default_target_temperature_low: 24 °C
heat_action:
- switch.turn_on: heater
idle_action:
- switch.turn_off: heater
The thermostat is working fine, but the output switch is staying on all the time. It does not toggle. Maybe because it is bound to the switch, which forces it to stay on? How can I decouple this?
Thanks