Quitar MQTT de las persianas

This commit is contained in:
dfcarvajal
2019-08-16 20:13:49 +02:00
parent cbcb388af6
commit b2a5c401df
9 changed files with 235 additions and 117 deletions

View File

@@ -1,20 +1,37 @@
sensor:
- platform: rest
name: "Persiana Habitación Principal Posición"
scan_interval: 5
resource: http://10.10.1.179/roller/0
value_template: '{{ value_json.current_pos }}'
unit_of_measurement: "%"
headers:
content-type: application/x-www-form-urlencoded
cover:
- platform: mqtt
name: "Persiana Habitación Principal"
state_topic: "shellies/shellyswitch25-744b67/roller/0"
command_topic: "shellies/shellyswitch25-744B67/roller/0/command"
position_topic: "shellies/shellyswitch25-744B67/roller/0/pos"
set_position_topic: "shellies/shellyswitch25-744B67/roller/0/command/pos"
availability_topic: "shellies/shellyswitch25-744B67/online"
state_open: "open"
state_closed: "close"
payload_available: "true"
payload_not_available: "false"
retain: false
optimistic: false
payload_open: "open"
payload_close: "close"
payload_stop: "stop"
position_open: 100
position_closed: 0
qos: 0
- platform: template
covers:
persiana_habitacion_principal:
position_template: "{{ states('sensor.persiana_habitacion_principal_posicion') | float }}"
open_cover:
service: rest_command.shelly_cover_action
data:
ip: 10.10.1.179
action: open
close_cover:
service: rest_command.shelly_cover_action
data:
ip: 10.10.1.179
action: close
stop_cover:
service: rest_command.shelly_cover_action
data:
ip: 10.10.1.179
action: stop
set_cover_position:
service: rest_command.shelly_cover_set_position
data_template:
position: "{{position}}"
data:
ip: 10.10.1.179
position: position