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:
|
input_select:
|
||||||
strip1_effect:
|
strip1_effect:
|
||||||
name: "Choix de l'effet"
|
name: "Choix de l'effet"
|
||||||
options:
|
options:
|
||||||
- 1
|
|
||||||
- 2
|
- 2
|
||||||
- 3
|
- 3
|
||||||
- 4
|
- 4
|
||||||
initial: 1
|
|
||||||
|
|
||||||
input_slider:
|
input_slider:
|
||||||
strip1_animation_speed:
|
strip1_animation_speed:
|
||||||
@ -24,27 +14,38 @@ input_slider:
|
|||||||
max: 150
|
max: 150
|
||||||
step: 10
|
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:
|
automation:
|
||||||
- alias: "Strip1 Effect"
|
- alias: "Strip1 Effect"
|
||||||
initial_state: True
|
|
||||||
hide_entity: False
|
hide_entity: False
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: "state"
|
||||||
entity_id: input_select.strip1_effect
|
entity_id: "input_select.strip1_effect"
|
||||||
action:
|
action:
|
||||||
- service: mqtt.publish
|
- service: "mqtt.publish"
|
||||||
data_template:
|
data_template:
|
||||||
topic: "strip1/seteffect"
|
command_topic: "strip1/effect/switch"
|
||||||
|
state_topic: "strip1/effect/status"
|
||||||
payload: '{{ trigger.to_state.state | string }}'
|
payload: '{{ trigger.to_state.state | string }}'
|
||||||
retain: True
|
retain: True
|
||||||
- alias: "Strip1 Animation Speed"
|
- alias: "Strip1 Animation Speed"
|
||||||
initial_state: True
|
|
||||||
hide_entity: False
|
hide_entity: False
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: "state"
|
||||||
entity_id: input_slider.strip1_animation_speed
|
entity_id: "input_slider.strip1_animation_speed"
|
||||||
action:
|
action:
|
||||||
- service: mqtt.publish
|
- service: "mqtt.publish"
|
||||||
data_template:
|
data_template:
|
||||||
topic: "strip1/setspeed"
|
command_topic: "strip1/speed/switch"
|
||||||
|
status_topic: "strip1/speed/switch"
|
||||||
payload: '{{ trigger.to_state.state | int }}'
|
payload: '{{ trigger.to_state.state | int }}'
|
||||||
|
retain: True
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user