From 71b194c365a6b4f445cb2b9121338413a7e03473 Mon Sep 17 00:00:00 2001 From: ccostan Date: Sun, 5 Jul 2020 13:24:27 -0400 Subject: [PATCH] More variations for this MQTTT set up for Garadget - #642 --- config/packages/garadget.yaml | 71 ++--------------------------------- 1 file changed, 4 insertions(+), 67 deletions(-) diff --git a/config/packages/garadget.yaml b/config/packages/garadget.yaml index c16f312c..47575214 100755 --- a/config/packages/garadget.yaml +++ b/config/packages/garadget.yaml @@ -25,91 +25,28 @@ cover: - platform: mqtt name: "Small Garage Door" + device_class: 'garage' command_topic: "garadget/Garadget Small/command" state_topic: "garadget/Garadget Small/status" - value_template: >- - {% if value_json.status == 'closed' %} - closed - {% else %} - open - {% endif %} - device_class: 'garage' payload_open: "open" payload_close: "close" payload_stop: "stop" - platform: mqtt name: "Large Garage Door" + device_class: 'garage' command_topic: "garadget/Garadget Large/command" state_topic: "garadget/Garadget Large/status" - value_template: >- - {% if value_json.status == 'closed' %} - closed - {% else %} - open - {% endif %} - device_class: 'garage' payload_open: "open" payload_close: "close" 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: garage_doors: # This group is used to check if doors are open or Closed. name: Garage Doors entities: - - cover.large_garage - - cover.small_garage + - cover.large_garage_door + - cover.small_garage_door ###################################################################### ## Garage Status Announcements - Only during normal hours.