Hello All,
I am fairly new to Home Assistant and I have been cobbling my HA environment together from examples found on the web. I am currently running 2020.12.1 in a docker container.
I just purchased an Open Garage to add to HA and it is mostly working using the example from here: https://www.home-assistant.io/integrations/opengarage/
But, I am having an issue getting the car in garage sensor to show up at all in HA.
Here is the entries from my configuration.yaml file:
cover:
platform: opengarage
covers:
garaged1:
host: 192.168.102.21
device_key: !secret opengarage_key
name: toyota
garaged2:
host: 192.168.102.22
device_key: !secret opengarage_key
name: tesla
sensor:
- platform: template
sensors:
garaged1_status:
friendly_name: 'Toyota Door Status'
value_template: '{% if states.cover.toyota %}
{% if states.cover.toyota.attributes["door_state"] == "open" %}
Open
{% elif states.cover.toyota.attributes["door_state"] == "closed" %}
Closed
{% elif states.cover.toyota.attributes["door_state"] == "opening" %}
Opening
{% elif states.cover.toyota.attributes["door_state"] == "closing" %}
Closing
{% else %}
Unknown
{% endif %}
{% else %}
n/a
{% endif %}'
icon_template: >-
{% if states.cover.tesla.attributes["door_state"] == "open" %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %}
garaged2_status:
friendly_name: 'Tesla Door Status'
value_template: '{% if states.cover.tesla %}
{% if states.cover.tesla.attributes["door_state"] == "open" %}
Open
{% elif states.cover.tesla.attributes["door_state"] == "closed" %}
Closed
{% elif states.cover.tesla.attributes["door_state"] == "opening" %}
Opening
{% elif states.cover.tesla.attributes["door_state"] == "closing" %}
Closing
{% else %}
Unknown
{% endif %}
{% else %}
n/a
{% endif %}'
icon_template: >-
{% if states.cover.tesla.attributes["door_state"] == "open" %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %}
binary_sensor:
- platform: template
sensors:
toyota_in_garage:
friendly_name: "Toyota In Garage"
value_template: "{{ state_attr('cover.toyota', 'distance_sensor') < 100 }}"
availability_template: >-
{% if is_state('cover.toyota','closed') %}
true
{% else %}
unavailable
{% endif %}
icon_template: >-
{% if is_state('binary_sensor.toyota_in_garage','on') %}
mdi:car
{% else %}
mdi:car-arrow-right
{% endif %}
unique_id: binary_sensor.toyota_in_garage
delay_on: 5
delay_off: 5
tesla_in_garage:
friendly_name: "Tesla In Garage"
value_template: "{{ state_attr('cover.tesla', 'distance_sensor') < 100 }}"
availability_template: >-
{% if is_state('cover.tesla','closed') %}
true
{% else %}
unavailable
{% endif %}
icon_template: >-
{% if is_state('binary_sensor.tesla_in_garage','on') %}
mdi:car
{% else %}
mdi:car-arrow-right
{% endif %}
unique_id: binary_sensor.tesla_in_garage
delay_on: 5
delay_off: 5
The door status, open/close, etc work fine. What isn’t working is the toyota_in_garage or the tesla_in_garage sensors. They don’t appear to be created and as a result, I get an error in the group.
There are no errors in the logs either.
I have checked the yaml in a yaml online checker and it looks good, so I feel like I am just missing something minor. Any suggestions what might be wrong/missing?