More variations for this MQTTT set up for Garadget - #642

This commit is contained in:
ccostan 2020-07-05 13:24:27 -04:00
parent e919938f40
commit 71b194c365
1 changed files with 4 additions and 67 deletions

View File

@ -25,91 +25,28 @@
cover: cover:
- platform: mqtt - platform: mqtt
name: "Small Garage Door" name: "Small Garage Door"
device_class: 'garage'
command_topic: "garadget/Garadget Small/command" command_topic: "garadget/Garadget Small/command"
state_topic: "garadget/Garadget Small/status" state_topic: "garadget/Garadget Small/status"
value_template: >-
{% if value_json.status == 'closed' %}
closed
{% else %}
open
{% endif %}
device_class: 'garage'
payload_open: "open" payload_open: "open"
payload_close: "close" payload_close: "close"
payload_stop: "stop" payload_stop: "stop"
- platform: mqtt - platform: mqtt
name: "Large Garage Door" name: "Large Garage Door"
device_class: 'garage'
command_topic: "garadget/Garadget Large/command" command_topic: "garadget/Garadget Large/command"
state_topic: "garadget/Garadget Large/status" state_topic: "garadget/Garadget Large/status"
value_template: >-
{% if value_json.status == 'closed' %}
closed
{% else %}
open
{% endif %}
device_class: 'garage'
payload_open: "open" payload_open: "open"
payload_close: "close" payload_close: "close"
payload_stop: "stop" payload_stop: "stop"
# sensor:
# - platform: template
# sensors:
# small_garage_status:
# friendly_name: 'State of the door'
# entity_id: []
# value_template: '{{ states.cover.small_garage.state }}'
# small_garage_time_in_state:
# friendly_name: 'Time Since Change'
# entity_id: []
# value_template: '{{ states.cover.small_garage.attributes["time_in_state"] }}'
# small_garage_wifi_signal_strength:
# entity_id: []
# friendly_name: 'WiFi strength'
# value_template: '{{ states.cover.small_garage.attributes["wifi_signal_strength"] }}'
# unit_of_measurement: 'dB'
# small_garage_reflection_rate:
# entity_id: []
# friendly_name: 'Reflection Rate'
# value_template: '{{ states.cover.small_garage.attributes["sensor_reflection_rate"] }}'
- platform: mqtt
name: 'Small Garage Brightness'
state_topic: 'garadget/Garadget Small/status'
value_template: '{{ value_json.bright }}'
- platform: mqtt
name: 'Large Garage Brightness'
state_topic: 'garadget/Garadget Large/status'
value_template: '{{ value_json.bright }}'
# - platform: template
# sensors:
# large_garage_status:
# friendly_name: 'State of the door'
# entity_id: []
# value_template: '{{ states.cover.large_garage.state }}'
# large_garage_time_in_state:
# friendly_name: 'Time Since Change'
# entity_id: []
# value_template: '{{ states.cover.large_garage.attributes["time_in_state"] }}'
# large_garage_wifi_signal_strength:
# entity_id: []
# friendly_name: 'WiFi strength'
# value_template: '{{ states.cover.large_garage.attributes["wifi_signal_strength"] }}'
# unit_of_measurement: 'dB'
# large_garage_reflection_rate:
# entity_id: []
# friendly_name: 'Reflection Rate'
# value_template: '{{ states.cover.large_garage.attributes["sensor_reflection_rate"] }}'
group: group:
garage_doors: # This group is used to check if doors are open or Closed. garage_doors: # This group is used to check if doors are open or Closed.
name: Garage Doors name: Garage Doors
entities: entities:
- cover.large_garage - cover.large_garage_door
- cover.small_garage - cover.small_garage_door
###################################################################### ######################################################################
## Garage Status Announcements - Only during normal hours. ## Garage Status Announcements - Only during normal hours.