This repository was archived by the owner on Apr 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 280
Homeassistant integration
Tobias Blum edited this page Mar 18, 2018
·
6 revisions
The integration into Homeassistant is enabled by default. You could enable/disable the functionality by (un-)commenting the "#define ENABLE_HOMEASSISTANT" in "definitions.h". It uses the ArduinoJSON library, so you have to install it also via "Library Manager", when you want to use the integration.
When you have Homeassistant integration enabled, there are three additional topics available:
- home/HOSTNAME_ha/state/in
- home/HOSTNAME_ha/state/out
- home/HOSTNAME_ha/speed Where HOSTNAME is the current hostname set in definitions.h.
The in-topic consumes JSON formatted data with the following structure:
{
"brightness": 196,
"color": {
"r": 255,
"g": 100,
"b": 10
},
"color_temp": 24
"effect": "Rainbow",
"state": "ON"
}- brightness: Value 0 - 255
- color: Structure with Red (r), Green (g) and Blue (b) values 0 - 255
- color_temp: Color temperature in mireds
- effect: Name of the effect like defined in WS2812FX - case sensitive.
- state: "ON" or "OFF"
Contains the current mode as JSON.
Example:
{
"state": "OFF",
"color": {
"r": 255,
"g": 86,
"b": 0
},
"brightness": 100,
"effect": "Static"
}Speed as value from 0 to 255.
You can find a sample config here.