From be053b362af9bfb5a6ce11921d114493feae20cc Mon Sep 17 00:00:00 2001 From: Julien Cabillot Date: Sat, 4 Mar 2017 01:40:17 +0100 Subject: [PATCH] ajout de light pour tester, ajout des topics de status --- ha_configuration.yml | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/ha_configuration.yml b/ha_configuration.yml index 35783c1..65e50de 100644 --- a/ha_configuration.yml +++ b/ha_configuration.yml @@ -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