Home Assistant Device Integration

Home Forums DIY Sand Table Home Assistant Device Integration

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #887
    Matt G
    Keymaster

    I’m switching from Smart Things to Home Assistant, and figured I’d post my current RESTful switch integration to let you control the LED lights on the sand table from home assistant. I haven’t found anything yet that can control a “dimmable” switch through REST yet, so the LED will always remain at a constant brightness (100 here – a little less than half. 255 is max brightness). I would like to implement all the features and controls of the sand table in HA, but I’m still a newbie, so this at least lets me shut the light off at night.

    Obviously replace SANDBOT_IP_ADDRESS with your local IP address of the sand table

    
    switch:
      - platform: rest
        resource: http://<SANDBOT_IP_ADDRESS>/setled
        state_resource: http://<SANDBOT_IP_ADDRESS>/status
        scan_interval: 5
        name: "Sand Table"
        body_on: '{"ledOn":1,"ledValue":100}'
        body_off: '{"ledOn":0,"ledValue":100}'
        is_on_template: "{{ value_json.ledOn == 1 }}"
        headers:
          Content-Type: application/json
    
    • This topic was modified 2 years, 6 months ago by Matt G.
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.