Skip to content

HASS Integration

Paul edited this page Sep 10, 2019 · 5 revisions

Home Assistant Integration

These lights can easily 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"
    brightness_scale: 100
    qos: 0
    payload_on: "1"
    payload_off: "0"
    optimistic: false

Additionally there is developmental support for HA MQTT Discovery. This is done through the php page mqttdiscovery.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