@Kosy wrote:
Hello You all.
I have RPI4 With HA Core (0.106.5) that will be sitting in a attic. I have also garage. I am really determined to control them by wire because this is most important (country) house entrance.
Distance between these two points is about 15-20 m. For that I decided to use Waveshare MCP23017, but of course distance is to great. Sice I have Nice Spido drive that has limit switches i decided to monitor 2 binary sensors to get 3 states (closes, opened, unknown). Drive has “start-stop-reverse logic” input and I am fine with that.
Also i would like to achieve really minimalistic thing: one icon representing state of gate, name and one switch.
After reading this topic i noticed that it is closest to my desired but i was not able to control button image with sensor state.
After reading this other solutions i had also problem with setting this cover as switch with “toggle script”
Finally i used this solution, but it has minimum of two buttons. I can live with that but it is arguing with logic of gate driver input (“start-stop-reverse logic” = toggle).
Now it looks like this:cover: - platform: template covers: garage1_door: friendly_name: "DRZWI LEWE" icon_template: > {% if is_state('binary_sensor.garage_door_13', 'on') %} mdi:garage {% elif is_state('binary_sensor.garage_door_12', 'on') %} mdi:garage-open {% else %} mdi:garage-alert {% endif %} open_cover: service: script.garruchlewe close_cover: service: script.garruchlewe garage0_door: friendly_name: "DRZWI PRAWE" icon_template: > {% if is_state('binary_sensor.garage_door_15', 'on') %} mdi:garage {% elif is_state('binary_sensor.garage_door_14', 'on') %} mdi:garage-open {% else %} mdi:garage-alert {% endif %} open_cover: service: script.garruchprawe close_cover: service: script.garruchprawe
I know that in practice this topic will is, a little bit about hardware. But I want to keep this expander in garage because i will be adding few things and I don`t want to drag all those wires to attic itself. I do not want to use any complicated system such as arduino as I/O communicating with RPI by RS and that is because I am new to pretty much all of it.
- Is there any other wired solution ? - If no I will just use P82B715P - I2C expander.
- Does anyone know how to change Input/Output direction for i2c?
- Does anyone have an idea how to achieve what I made with cover.template but in button minimalistic form ?
PS Thanks to my friend “SZU” that lured me into this HA community
Posts: 1
Participants: 1