Christoph Giesche da4fe2c37b Merge pull request #39 from cgiesche/streamdeck-homeassistant-38
Fixed bug that prevented users to save settings after clean install. …
2021-05-04 21:04:40 +02:00
2021-05-03 12:06:23 +02:00
2021-04-30 23:47:21 +02:00
2021-04-30 23:47:21 +02:00
2020-12-31 17:51:04 +01:00
2020-12-31 17:51:04 +01:00
2021-02-07 00:18:46 +01:00
2021-05-01 00:13:26 +02:00
2021-01-09 20:26:44 +01:00

streamdeck-homeassistant

The aim of this project is to allow owners of an elgato StreamDeck to control their entities or display sensor data via their StreamDeck. As the code is kept very generic, nearly every sensor should work out of the box as well as every service that does not need any more information but the entity id.

img.png

Features

Generic functions for any Home Assistant entity

  • Display state and additional attributes via customizable templates
  • Call any available service when a StreamDeck button is pressed

Entities with background-icons

  • Switches
  • Lights (same icon as switches)
  • Input Boolean (same icon as switches)
  • Binary Sensors (like switches, but without "moving" circle)
    • Plugs
  • Temperature
  • Humidity
  • Pressure
  • Power
  • Battery-Level
  • Weather

Installation

Prequisites

  • Installed Stream-Deck application
  • Connected Stream-Deck

Download & Installation

Configuration

There are two sections on the plugin's cofiguration panel:

  • Home Assistant Settings
    Contains global settings for your Home Assistant installation. Once saved, the settings are used for all stream deck Buttons.
  • Entity Settings Contains settings for an individual button.

Home Assistant Settings

  • Server URL: ws://your-homeassistant-ip-or-hostname:your-homeassistant-port/api/websocket, for example (local network) ws://192.126.0.5:8123/api/websocket or (public, with ssl enabled on default port 443) wss://my-secure-homeassistant.com/api/websocket.
  • Access Token: An long-lived access-token obtained from your Home Assistant.
    Long-lived access tokens can be created using the "Long-Lived Access Tokens" section at the bottom of a user's Home Assistant profile page. (Quote from https://developers.home-assistant.io/docs/auth_api/#long-lived-access-token)

After you saved your Home Assistant Settings, the plugin will automatically try to connect to your Home Assistant installation. If the connection was sucessful, the Entity Settings section should allow you to see and configure your entities.

img_1.png

Entity Settings

Basic configuration

  • Domain: Home Assistant entities are grouped by domains. Select the domain (for example "switch") of an entity, you want to configure.
  • Entity: This is the actual entity you are going to configure (for example "Kitchen Light")
  • Service: The service that will be called every time you press the StreamDeck button.
  • Service (long press): The service that will be called every time you press and hold the StreamDeck button for more than 300ms.
  • Service Data JSON: JSON formatted data that is sent with your service call when you press a button. Example:
    {
      "brightness": 120,
      "rgb_color": [255, 0, 0]
    }
    
    Please note: If not specified in the JSON, the attribute entity_id is added automatically containing the selected entity's id.

Advanced configuration

  • Custom Title: Enable to override the main Title of this button. You have to clear the main Title field on top to make this work!

    • Title Template: A nunjucks template that will be used as the button's title. You can use any of the variables (depending on the selected entity) that are shown below the text-field. For example {{temperature}}°C or {{friendly_name}} or (this won't fit the button, but you get the idea) The pressure is {{pressure}} and the wind speed is {{wind_speed}}.
      • The variable {{state}} always contains the "main state" of an entity (for example "on" and "off" for buttons or "12.4" for temperature sensors)
      • The variable {{unit_of_measurement}} often contains the ... unit of measurement ... of a sensor's state (for example "°C" for a temperature sensor)
  • Custom Labels: Every button can display 3 lines of information, additional to the main title. You can customize them as you like.

    • Button line X: Supports exactly the same nunjucks template syntax as the main title (see above.)

After you hit the save button, the button should immediately show the new configuration.

img.png

Happy? Consider to donating me a coffee :)

buy me a coffee

Description
No description provided
Readme MIT 4.9 MiB
Languages
TypeScript 74.6%
Vue 24.7%
HTML 0.6%
SCSS 0.1%