ajout de light pour tester, ajout des topics de status
This commit is contained in:
parent
d6a0afae79
commit
be053b362a
@ -1,20 +1,10 @@
|
||||
# TODO : Il serait bien de pouvoir donner un nom joli sans envoyer de string
|
||||
mqtt:
|
||||
broker: "mqtt"
|
||||
port: 1883
|
||||
client_id: "homeassistant1"
|
||||
username: "***REMOVED***"
|
||||
password: "***REMOVED***"
|
||||
|
||||
input_select:
|
||||
strip1_effect:
|
||||
name: "Choix de l'effet"
|
||||
options:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
initial: 1
|
||||
|
||||
input_slider:
|
||||
strip1_animation_speed:
|
||||
@ -24,27 +14,38 @@ input_slider:
|
||||
max: 150
|
||||
step: 10
|
||||
|
||||
light:
|
||||
platform: "mqtt"
|
||||
name: "Test ESP"
|
||||
command_topic: "strip1/switch"
|
||||
state_topic: "strip1/status"
|
||||
rgb_state_topic: "strip1/color/switch"
|
||||
rgb_command_topic: "strip1/color/status"
|
||||
brightness_state_topic: "strip1/brightness/switch"
|
||||
brightness_command_topic: "strip1/brightness/status"
|
||||
|
||||
automation:
|
||||
- alias: "Strip1 Effect"
|
||||
initial_state: True
|
||||
hide_entity: False
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_select.strip1_effect
|
||||
- platform: "state"
|
||||
entity_id: "input_select.strip1_effect"
|
||||
action:
|
||||
- service: mqtt.publish
|
||||
- service: "mqtt.publish"
|
||||
data_template:
|
||||
topic: "strip1/seteffect"
|
||||
command_topic: "strip1/effect/switch"
|
||||
state_topic: "strip1/effect/status"
|
||||
payload: '{{ trigger.to_state.state | string }}'
|
||||
retain: True
|
||||
- alias: "Strip1 Animation Speed"
|
||||
initial_state: True
|
||||
hide_entity: False
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_slider.strip1_animation_speed
|
||||
- platform: "state"
|
||||
entity_id: "input_slider.strip1_animation_speed"
|
||||
action:
|
||||
- service: mqtt.publish
|
||||
- service: "mqtt.publish"
|
||||
data_template:
|
||||
topic: "strip1/setspeed"
|
||||
command_topic: "strip1/speed/switch"
|
||||
status_topic: "strip1/speed/switch"
|
||||
payload: '{{ trigger.to_state.state | int }}'
|
||||
retain: True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user