forked from bren1818/TCPLightingWebInterface
-
Notifications
You must be signed in to change notification settings - Fork 4
HASS Integration
Paul edited this page Feb 16, 2021
·
5 revisions
These lights can be integrated into Home Assistant with YAML. For example.
- platform: mqtt
name: "Back Entry"
state_topic: "light/RearEntrance/BackDoor/216773570733040739/status"
command_topic: "light/RearEntrance/BackDoor/216773570733040739/switch"
brightness_state_topic: "light/RearEntrance/BackDoor/216773570733040739/brightness"
brightness_command_topic: "light/RearEntrance/BackDoor/216773570733040739/brightness/set"
availability_topic: "light/RearEntrance/BackDoor/216773570733040739/LWT"
brightness_scale: 100
qos: 0
payload_on: "1"
payload_off: "0"
optimistic: false
Home Assistant MQTT Discovery is supported. This is done through the PHP page mqttdiscovery.php
The subscription script is listening for an MQTT Birth Message from Home Assistant. By default, this is a payload of online sent to the topic homeassistant/status. The topic can be changed by editing the $HASSOnline variable in config.inc.php
As HA doesn't retain discovered devices on restart I have chosen to also run this page as a cron job every 5 minutes ie.
*/5 * * * * lynx -dump https://lighting.local/mqttdiscovery.php
- Home
- Installation & Configuration
- Pi Setup Walk-through
- Additional Project Information