I purchased an M5Stack NanoH2 for $7 to experiment with, and was able to have it communicate with Home Assistant using my Apple TV as a thread border router. Home Assistant is now able to control both my Daikin and Mitsubishi ACs thanks to this tiny widget. The only tricky part was getting both the IR transmitter and the RGB LED working at the same time. I couldn't quite figure out how to make them use different RMT channels, but setting the rmt_symbols to 48 for both seems to work. I don't know if setting rmt_symbols to 48 for the IR transmitter affects the length of the IR codes it can transmit, but so far all the codes seem to be transmitting correctly to my ACs.
The device seems to use around 18mA on average. In the future I plan to experiment with making this a battery powered sleepy end device. I also want to report double clicks and long presses on the built-in button to HA, but for now it only reports reports presses and releases.
Here's the config in case it's useful to someone else:
substitutions:
devicename: bedroom-nanoh2
upper_devicename: Bedroom Nano-H2
esphome:
name: ${devicename}
name_add_mac_suffix: False
project:
name: m5stack.nano-h2
version: "1.0"
esp32:
board: esp32-h2-devkitm-1
variant: ESP32H2
framework:
type: esp-idf
api:
encryption:
key: !secret api_encryption_key
network:
enable_ipv6: true
openthread:
tlv: !secret openthread_tlv
ota:
- platform: esphome
password: !secret ota_password
remote_transmitter:
id: ir_tx
pin: GPIO3
rmt_symbols: 48
non_blocking: True
carrier_duty_percent: 50%
climate:
- platform: mitsubishi
name: "Mitsubishi AC"
supports_heat: False
set_fan_mode: quiet_4levels
supports_dry: True
horizontal_default: middle
vertical_default: down
infrared:
- platform: ir_rf_proxy
name: IR Proxy Transmitter
id: ir_proxy_tx
remote_transmitter_id: ir_tx
power_supply:
- id: rgb_pwr
pin: GPIO10
light:
- platform: status_led
name: "Status"
pin: GPIO04
- platform: esp32_rmt_led_strip
name: "RGB LED"
id: nanoh2_rgb
rgb_order: GRB
pin: GPIO11
power_supply: rgb_pwr
num_leds: 1
chipset: WS2812
is_rgbw: true
rmt_symbols: 48
effects:
- random:
- flicker:
- addressable_rainbow:
binary_sensor:
- platform: gpio
pin:
number: GPIO9
inverted: true
mode: INPUT_PULLUP
name: "Button"
button:
- platform: factory_reset
id: factory_reset_button
name: "Factory Reset"
entity_category: diagnostic
internal: true
- platform: restart
id: restart_button
name: "Restart"
entity_category: config
disabled_by_default: true
icon: "mdi:restart"