devices.esphome.io

AGL Switch 2, 3 gang variants

AGL Switch 2, 3 gang variants

Device Type: switch
Electrical Standard: br
Board: esp8266
Difficulty: Disassembly required, 3/5

The AGL Switch is available in Brazil. AGL

General Notes

This config was created based on the 2 gang switch that I had.

Product Images

Front of 2 gang switch alt text

Back of 2 gang switch alt text

GPIO Pinout

2-Gang Version

PCB alt text

PinFunction
GPIO2Status LED
GPIO16Button 1 (HIGH = off, LOW = on)
GPIO5Button 2 (HIGH = off, LOW = on)
GPIO13Relay 1
GPIO12Relay 2

3-Gang Version

PinFunction
GPIO2Status LED
GPIO16Button 1 (HIGH = off, LOW = on)
GPIO5Button 2 (HIGH = off, LOW = on)
GPIO4Button 3 (HIGH = off, LOW = on)
GPIO13Relay 1
GPIO12Relay 2
GPIO14Relay 3

Basic Configuration (2-Gang)

esphome:
name: example-device
friendly_name: Example Device
esp8266:
board: esp01_1m
# OTA flashing
ota:
- platform: esphome
wifi: # Your Wifi network details
# Enable fallback hotspot in case wifi connection fails
ap:
# Enabling the logging component
logger:
# Enable Home Assistant API
api:
# Enable the captive portal
captive_portal:
sensor:
- platform: uptime
name: AGL 2 Gang Uptime
update_interval: 60s
text_sensor:
- platform: version
name: AGL 2 Gang Version
binary_sensor:
- platform: status
name: AGL 2 Gang Status
- platform: gpio
pin:
number: GPIO16
inverted: True
name: AGL 2 Gang Button 1
on_press:
- switch.toggle: relay_1
- platform: gpio
pin:
number: GPIO5
mode: INPUT_PULLUP
inverted: True
name: "AGL 2 Gang Button 2"
on_press:
- switch.toggle: relay_2
switch:
- platform: restart
name: AGL 2 Gang Restart
- platform: gpio
name: "AGL 2 Gang Switch 1"
pin: GPIO13
id: relay_1
- platform: gpio
name: "AGL 2 Gang Switch 2"
pin: GPIO12
id: relay_2
light:
- platform: status_led
id: blue_led
restore_mode: ALWAYS_ON
pin:
number: GPIO2
inverted: true
internal: true
Edit this page on GitHub