Ich habe die Klimaanlage wieder zusammengebaut, wird ja gerade gebraucht.
Den ESP auf dem Wifi Steckplatz habe ich drin gelassen, aber machen tut er erstmal nichts.
Dafür habe ich einen anderen ESP8266 mit IR Sender (mit 940 nm Wellenlänge) ausgestattet und kann den nun wie die Fernbedienung verwenden, aber von HA ansteuern.
Hier der ESPHome-Code:
esphome:
name: esp-ir
friendly_name: ESP-IR
esp8266:
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: !secret esphome_encryption_key
ota:
- platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
min_auth_mode: WPA2
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Klimaanlage Fallback Hotspot"
password: !secret ota_password
captive_portal:
# Infrarot
#remote_receiver:
# pin:
# number: GPIO4 #Pin D2
# inverted: true
# dump: all
# sendet IR Signale
remote_transmitter:
pin: GPIO5 #Pin D1
carrier_duty_percent: 50
#Tronic Klimaanlage
switch:
- platform: template
name: Tronic_Plus
icon: mdi:thermometer-plus
turn_on_action:
remote_transmitter.transmit_nec:
address: 0x7F80
command: 0x6B94
command_repeats: 1
- platform: template
name: Tronic_Mode
icon: mdi:format-list-bulleted
turn_on_action:
remote_transmitter.transmit_nec:
address: 0x7F80
command: 0x629D
command_repeats: 1
- platform: template
name: Tronic_Timer
icon: mdi:timer-outline
turn_on_action:
remote_transmitter.transmit_nec:
address: 0x7F80
command: 0x609F
command_repeats: 1
- platform: template
name: Tronic_Ein_Aus
icon: mdi:power
turn_on_action:
remote_transmitter.transmit_nec:
address: 0x7F80
command: 0x639C
command_repeats: 1
- platform: template
name: Tronic_Minus
icon: mdi:thermometer-minus
turn_on_action:
remote_transmitter.transmit_nec:
address: 0x7F80
command: 0x6A95
command_repeats: 1
- platform: template
name: Tronic_Swing
icon: mdi:arrow-oscillating
turn_on_action:
remote_transmitter.transmit_nec:
address: 0x7F80
command: 0x6D92
command_repeats: 1
- platform: template
name: Tronic_Sleep
icon: mdi:power-sleep
turn_on_action:
remote_transmitter.transmit_nec:
address: 0x7F80
command: 0x649B
command_repeats: 1
- platform: template
name: Tronic_Speed
icon: mdi:fan
turn_on_action:
remote_transmitter.transmit_nec:
address: 0x7F80
command: 0x6996
command_repeats: 1
Zum Einlesen hatte ich einen IR-Empfänger angeschlossen. Der wird aber nicht benötigt, solange nicht weitere Codes eingelesen werden sollen. Der Code zum Einlesen habe ich auskommentiert, um nicht unnötig Resourcen zu belegen.
