Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 436 Bytes

File metadata and controls

20 lines (17 loc) · 436 Bytes

MQTT Switch - Home Assistant

A simple example to control a switch connected to a NodeMCU board (ESP8266).

Configuration

configuration.yaml :

switch:
  platform: mqtt
  name: 'Office Switch'
  state_topic: 'office/switch1/status'
  command_topic: 'office/switch1/set'
  retain: true
  optimistic: false

Schematic

  • Switch leg 1 - VCC
  • Switch leg 2 - D1/GPIO5 - Resistor 10K Ohms - GND

Schematic