Controlling Home Assistant with a StreamDeck

On this week’s (late) video we take a look at how to control your home assistant with an Elgato Stream Deck. You can use this cool device for a ton of things, why not control your house?

We take a look at what else you can do with a Stream Deck (other than control a stream), and I show you two different methods of sending commands from the deck to your Home Assistant.

Home Assistant API Call from API Ninja

Download Example Here: (Homeassistant.ninja)

Here is a version if you want to copy and paste:

{"version":"1.0","requestType":1,"url":"http://[IPADDRESS]:8123/api/services/light/toggle","contentType":"application/json","loadFromFiles":false,"headersFile":"","dataFile":"","headers":"authorization: Bearer [TOKEN]","data":"{\"entity_id\": \"[ENTITY_ID]\"}","responseShown":"*","autorunMinutes":"0","autorunType":0,"titlePrefix":"","titleSuffix":"","responseFormat":"","saveResponseToFile":true,"parseResponse":false,"responseRegex":"","responseRegexFetch":"","debugLogging":true,"treatResponseAsText":true,"treatResponseAsImage":false,"showCustomImages":false,"customImageValue":"","matchedImage":"","unmatchedImage":"","responseImageField":"","hideSuccessIndicator":false}

You need to replace all values in square brackets ( [] ).

Switch Fan Speed Automation

alias: Webhook - Change Office Fan Speed
description: ''
trigger:
  - platform: webhook
    webhook_id: office_fan_speed
condition: []
action:
  - service: fan.set_speed
    target:
      entity_id: fan.office_fan
    data:
      speed: >
        {% if states.fan.office_fan.attributes.speed  == 'off' %}low{% elif
        states.fan.office_fan.attributes.speed  == 'low' %}medium{% elif
        states.fan.office_fan.attributes.speed  == 'medium' %}high{% elif
        states.fan.office_fan.attributes.speed  == 'high' %}off{% else %}Error{%
        endif %}
  - service: zwave_js.refresh_value
    data:
      entity_id: fan.office_fan
      refresh_all_values: true
mode: single