Hello i create a simple controller for my terrarium! I like to controll Temp and Humidity with a bme280 sensor and 2 Relays. The Temp automation run, the humidity not
Have everyone a idea? Sorry my English is bad.
is the prolem solved, i like is Humidity below 60% then relay 5sec on then out and wait 30sec and restart to value up 60%
best greets
Emanuel
captive_portal:
i2c:
- id: bus_1
sda: GPIO4
scl: GPIO5
scan: true
time:
- platform: sntp
id: sntp_time
display:
- platform: lcd_pcf8574
dimensions: 20x4
address: 0x27
update_interval: 20sec
lambda: |-
it.print(2, 0, "SchneckenControll");
it.printf(0, 1, "Temperatur: %6.1f", id(bme280_temperatur2).state);
it.printf(0, 2, "Feuchtigkeit: %2.1f", id(bme_luftfeuchte2).state);
it.strftime(0, 3, " %H:%M %d.%m.%Y", id(sntp_time).now());
sensor:
- platform: bme280
i2c_id: bus_1
temperature:
name: "Temperatur"
id: bme280_temperatur2
oversampling: 16x
accuracy_decimals: 1
on_value_range:
- above: 30.0
then:
- switch.turn_off: heizung
- below: 27.0
then:
- switch.turn_on: heizung
humidity:
name: "Luftfeuchte"
id: "bme_luftfeuchte2"
accuracy_decimals: 1
on_value_range:
- above: 70.0
then:
- switch.turn_off: sprayer
- below: 60.0
then:
- switch.turn_on: sprayer
update_interval: 10s
address: 0x76
# The relay control pin (local only)
switch:
- platform: gpio
pin: GPIO14
id: heizung
inverted: true
- platform: gpio
pin: GPIO12
id: sprayer
inverted: true
- platform: template
name: "Heizung"
optimistic: true
lambda: |-
if (id(heizung).state) {
return true;
} else {
return false;
}
on_turn_on:
- switch.turn_on: heizung
on_turn_off:
- switch.turn_off: heizung
- platform: template
name: "WassersprĂźher"
optimistic: true
if (id(sprayer).state) {
return true;
} else {
return false;
}
on_turn_on:
- switch.turn_on: sprayer
on_turn_off:
- switch.turn_off: sprayer