Интеграция GyverLamp в Home Assistant
Шьем свою ESP прошивкой с MQTT отсюда. В Home Assistant в configuration.yaml добавляем:
input_number:
gl_brightness:
name: Brightness
initial: 10
min: 1
max: 255
step: 1
icon: mdi:brightness-6
gl_speed:
name: Speed
initial: 30
min: 0
max: 255
step: 1
icon: mdi:speedometer
gl_scale:
name: Scale
initial: 30
min: 1
max: 100
step: 1
icon: mdi:ruler
input_select:
gl_effect:
name: Effects
options:
- "Конфетти"
- "Огонь"
- "Радуга верт."
- "Радуга гориз."
- "Смена цвета"
- "Безумие 3D"
- "Облака 3D"
- "Лава 3D"
- "Плазма 3D"
- "Радуга 3D"
- "Павлин 3D"
- "Зебра 3D"
- "Лес 3D"
- "Океан 3D"
- "Цвет"
- "Снегопад"
- "Матрица"
- "Светлячки"
- "Аквариум"
- "Звездопад"
- "Пейнтбол"
- "Спираль"
- "Теплый свет"
- "Маятник"
- "Мерцание"
- "Полицейская сирена"
- "Дрейф"
- "Стая"
- "Мотыльки в банке"
- "Демо"
initial: "Демо"
icon: mdi:panda
В automations.yaml:
- alias: Gyver Speed
trigger:
platform: state
entity_id: input_number.gl_speed
action:
- service: mqtt.publish
data_template:
topic: homeassistant/light/ESP-dec1cf/effect/speed/set
payload_template: "{{ trigger.to_state.state | int }}"
- alias: Gyver Scale
trigger:
platform: state
entity_id: input_number.gl_scale
action:
- service: mqtt.publish
data_template:
topic: homeassistant/light/ESP-dec1cf/effect/scale/set
payload_template: "{{ trigger.to_state.state | int }}"
- alias: Gyver Brightness
trigger:
platform: state
entity_id: input_number.gl_brightness
action:
- service: mqtt.publish
data_template:
topic: homeassistant/light/ESP-dec1cf/brightness/set
payload_template: "{{ trigger.to_state.state | int }}"
- alias: Gyver Effect
trigger:
- platform: state
entity_id: input_select.gl_effect
action:
- service: mqtt.publish
data_template:
topic: homeassistant/light/ESP-dec1cf/effect/set
retain: true
payload: "{{ states('input_select.gl_effect') }}"
Радуемся: