is working
binary_sensor:
- platform: gpio
pin: D5
name: "Kombi Up Button"
id: kombi_up_button
internal: true
on_press:
- logger.log: "######### up button"
- while:
condition:
and:
- binary_sensor.is_on: kombi_up_button
- lambda: 'return id(kombi_termostat).target_temperature < 30.0;'
then:
- climate.control:
id: kombi_termostat
mode: HEAT
target_temperature: !lambda |-
return id(kombi_termostat).target_temperature + 0.5;
- logger.log:
format: "######### set target temp %.1f"
args: ["id(kombi_termostat).target_temperature"]
- delay: 700ms
on_multi_click:
# mode off by pressing two keys
- timing:
- ON for at least 0.7s
then:
- if:
condition:
- binary_sensor.is_on: kombi_down_button
- lambda: 'return id(kombi_termostat).mode;'
then:
climate.control:
id: kombi_termostat
mode: "OFF"
- platform: gpio
pin: D6
name: "Kombi Down Button"
id: kombi_down_button
internal: true
on_press:
- logger.log: "######### down button"
- while:
condition:
and:
- binary_sensor.is_on: kombi_down_button
- lambda: 'return id(kombi_termostat).target_temperature < 30.0;'
then:
- climate.control:
id: kombi_termostat
mode: HEAT
target_temperature: !lambda |-
return id(kombi_termostat).target_temperature + 0.5;
- logger.log:
format: "######### set target temp %.1f"
args: ["id(kombi_termostat).target_temperature"]
- delay: 700ms
climate:
- platform: thermostat
sensor: temp # sensor edit!
name: "Kombi Termostat"
id: kombi_termostat
default_target_temperature_low: 23 °C
visual:
min_temperature: 18 °C
max_temperature: 30 °C
temperature_step: 0.5 °C
heat_action:
- switch.turn_on: kombi_relay
idle_action:
- switch.turn_off: kombi_relay
sensor:
- platform: sht3xd
temperature:
name: "Kombi Termostat - Temperature"
id: temp_local
humidity:
name: "Kombi Termostat - Humidity"
id: humidity_local
address: 0x44
- platform: homeassistant
id: temp_ha
entity_id: sensor.sicaklik
internal: true
on_value:
then:
- logger.log: "######### temp_ha to temp"
- lambda: 'id(temp).publish_state(id(temp_ha).state);'
- platform: homeassistant
id: humidity_ha
entity_id: sensor.nem
internal: true
- platform: template
name: "Temperature Sensor"
id: temp
internal: true
lambda: |-
return id(temp_ha).has_state() ? id(temp_ha).state: id(temp_local).state;