Hello,
just wanted to summarize all the information regarding Thalia + Shelly UNI.
What we get in HA:
Cover entity with changing icon (gates closed/open) and corresponding buttons enabled.
The states are represented no matter how you activate gate operations.


-
Configure Thalia
a) use this connection scheme:
#60 COM → OUT1 and OUT2 GND, this is common ground
#61 IC1 → OUT1 - to activate opening of gates
#62 IC2 → OUT2 - to activate closing of gates
#51 24V+ → #27 and Vcc(1)
#50 24V- → N(2)
#20 → IN_1(7) - you will get 24V when gates are moving
#26 → IN_2(8) - you will get 24V when gates are closed
b) Set logic of Output 1 to IC=2 : Open
c) Set logic of Output 2 to IC=3 : Close
d) Set logic of Input 1 wired to terminal #20-21, Aux0=6 : “FLASHING LIGHT, Contact stays closed while leaves are operating”
e) Set logic of Input 2 wired to terminal #26-27, Aux3=8 : “MAGNETIC LOCK, Contact stays closed while gate is closed” -
Configure your shelly UNI as follows:
a) Chanel 1 and 2 set “Button type” as “Detached Switch”
b) “appliance type” as “relay”
c) set “Timer”->“Auto off” - 0.5 second
d) “Power On Default” - “Off”
e) Restart your shelly uni - this was important for me as shelly was not working properly until I restarted it. -
HA should discover your UNI by now, so just configure you entities names.
a) IN_1 and IN_2 sensors are disabled by default, so just enable them in HA UNI device.
b) I have set IN_2 as “bft_shelly_gates_closed”, “Show as”: “Power”, “Icon”: “mdi:gate”
c) IN_1 as “bft_shelly_gates_moving”, “Show as”: “Moving”, “Icon”: “mdi:gate-open”
d) add a cover:
- platform: template
covers:
bft_gates:
device_class: gate
friendly_name: "BFT Gates"
value_template: >-
{% if is_state('binary_sensor.bft_shelly_gates_closed', 'off') %}
open
{% else %}
closed
{% endif %}
optimistic: true
open_cover:
service: switch.turn_on
data:
entity_id: switch.bft_shelly_channel_1_open
close_cover:
service: switch.turn_on
data:
entity_id: switch.bft_shelly_channel_2_close
If someone finds something I have missed - please let me know - I will correct the post
Thanks for everyone who shared you implementations to make this post possible
