Skip to content

Instantly share code, notes, and snippets.

@evilmarty
Last active February 26, 2023 05:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evilmarty/48c81b3a76558a7489fb4168d02d916c to your computer and use it in GitHub Desktop.
Save evilmarty/48c81b3a76558a7489fb4168d02d916c to your computer and use it in GitHub Desktop.
Genio IR Controller ESPHome Template
substitutions:
name: "genio-ir-controller"
# Get this value from https://esphome.io/components/climate/climate_ir.html
ac_platform: "coolix"
dashboard_import:
package_import_url: https://gist.githubusercontent.com/evilmarty/48c81b3a76558a7489fb4168d02d916c/raw/dd8dc2e216cad8e36cfb4d60dbd0d0527c10aaee/genio-ir-controller-template.yaml
esphome:
name: "${name}"
on_boot:
priority: 100 # Highest priority, ensures light turns on without delay.
then:
- script.execute: blink_red_led
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: !secret ha_encryption_key
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Lounge-Ac-Controller"
password: !secret ap_password
captive_portal:
web_server:
script:
- id: blink_red_led
then:
- light.turn_on:
id: light_red_led
transition_length: 100ms
- delay: 500ms
- light.turn_off:
id: light_red_led
transition_length: 100ms
climate:
- platform: "${ac_platform}"
name: "Air Conditioner"
receiver_id: rcvr
on_state:
- script.execute: blink_red_led
remote_transmitter:
pin: GPIO14
carrier_duty_percent: 50%
remote_receiver:
id: rcvr
pin:
number: GPIO5
inverted: True
# Uncomment your supported remote provider or check support at https://esphome.io/components/remote_receiver.html
#on_coolix:
#on_lg:
#on_midea:
#on_panasonic:
#on_samsung:
#on_samsung36:
#on_sony:
#on_toshiba_ac:
# - script.execute: blink_red_led
binary_sensor:
- platform: gpio
pin:
number: GPIO13
mode: INPUT_PULLUP
inverted: True
name: "Button"
internal: True
output:
- platform: esp8266_pwm
id: red_led
pin:
number: GPIO4
inverted: True
light:
- platform: monochromatic
name: "Red LED"
output: red_led
id: light_red_led
internal: True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment