Hi
!
I have the same module. There may be cleaner ways to accomplish that, but this works fine for me:
knx:
expose:
# Garagentor - Fake-status
- entity_id: sensor.garagentor_fake_status
type: percent
address: "i-garagentor-position-state"
binary_sensor:
- name: "Garagentor offen"
state_address: '3/3/7'
device_class: 'garage_door'
- name: "Garagentor zu"
state_address: '3/3/8'
device_class: 'garage_door'
cover:
- name: "Garagentor"
move_long_address: '3/3/1'
stop_address: '3/3/2'
position_state_address: "i-garagentor-position-state"
device_class: garage
travelling_time_down: 20
travelling_time_up: 14
template:
- sensor:
- name: "Garagentor Fake-Status"
unique_id: "garagentor-fake-status"
unit_of_measurement: "%"
availability: >-
{{ states('binary_sensor.garagentor_zu') == 'on' or
states('binary_sensor.garagentor_offen') == 'on' }}
state: >
{% if states('binary_sensor.garagentor_zu') == "on" %}
100
{% elif states('binary_sensor.garagento_offen') == "on" %}
0
{% else %}
unavailable
{% endif %}