home-assistant-custom-components-cover-time-based icon indicating copy to clipboard operation
home-assistant-custom-components-cover-time-based copied to clipboard

cover-time-based component follow when switches are actived external...

Open marcelrealsolutionsnu opened this issue 4 years ago • 2 comments

Hello,

The cover-time-based component works great to control my rollers/shutters (they are now connected to modbus I/O, one output for open, one output for close). I've also tested this with Sonoff Wifi Wall switch (https://sonoff.tech/product/wifi-smart-wall-swithes/tx-series) and this works also great as long as the command comes from home-assistant (HA).

My question is: the great advantage of the Sonoff Wifi Wall switch is that I can replace my current switches, and still can control them by touching the switch, or via home-assistant. But if I control via the switch by pressing the button, then the shutters can be opened/closed, but HA does not 'know' this, so my idea is: if I notice in HA that the switch for 'opening' is active/pressed and the cover in HA is not in state 'opening' then trigger the cover to open... (so in that case the cover in HA follows the state when I press the buttons on the wall switch).... Seems to me that this can be achieved, but hope you have good ideas how to do this...

BR, and I will of-course buy you a coffee/beer! Marcel (The Netherlands)

marcelrealsolutionsnu avatar Feb 12 '21 08:02 marcelrealsolutionsnu

Hello, To do that, you need to put your Sonoff Wifi wall switch in detached mode. You can replace the firmware with tasmota and configure them in detached mode. https://tasmota.github.io/docs/Buttons-and-Switches/#detach-switches-based-on

Once this is done, you will need to assign the relays to the cover component (open_switch_entity_id and close_switch_entity_id) and create an automation with button events to open and close the cover.

For example When the right button is pressed:

entity_id: cover.your_cover_alias
service: cover.open_cover

When the left button is pressed

entity_id: cover.your_cover_alias
service: cover.close_cover

When the two buttons are pressed at the same time:

entity_id: cover.your_cover_alias
service: cover.stop_cover

So it will be "HA" who controls the relays and will have knowledge of when the button has been pressed.

Sonoff Wifi wall switch Tasmota templates https://templates.blakadder.com/sonoff_TX-T0EU2C.html

:)

davidramosweb avatar Feb 12 '21 10:02 davidramosweb

Hello, thanx for your quick reaction!

I already looked to Tasmota, but I really (if possible) want to avoid flashing… And a negative thing (in my opinion) is also that when the switches are detached, then the shutters can’t be operated when there is an issue with the network, HA, or whatever (so the advantage of the Sonoff switches is also that I have a kind of a fallback scenario…. What ever happens, the shutters can be controlled)

But maybe both ‘flavours’ can be mixed? My idea was to ‘program’ something in HA that when I receive a ‘trigger’ that the Sonoff switch is opening the shutter, and this the cover-entitiy in HA is not in ‘opening’ state, then give the command ‘cover.open_cover’…

So before switching over to tasmota I first will try that idea…

Kind regards, Marcel

Van: davidramosweb [email protected] Verzonden: vrijdag 12 februari 2021 11:10 Aan: davidramosweb/home-assistant-custom-components-cover-time-based home-assistant-custom-components-cover-time-based@noreply.github.com CC: Marcel van der Jagt [email protected]; Author [email protected] Onderwerp: Re: [davidramosweb/home-assistant-custom-components-cover-time-based] cover-time-based component follow when switches are actived external... (#7)

Hello, To do that, you need to put your Sonoff Wifi wall switch in detached mode. You can replace the firmware with tasmota and configure them in detached mode. https://tasmota.github.io/docs/Buttons-and-Switches/#detach-switches-based-on

Once this is done, you will need to assign the relays to the cover component (open_switch_entity_id and close_switch_entity_id) and create an automation with button events to open and close the cover.

For example When the right button is pressed:

entity_id: cover.your_cover_alias

service: cover.open_cover

When the left button is pressed

entity_id: cover.your_cover_alias

service: cover.close_cover

When the two buttons are pressed at the same time:

entity_id: cover.your_cover_alias

service: cover.stop_cover

So it will be "HA" who controls the relays and will have knowledge of when the button has been pressed.

Sonoff Wifi wall switch Tasmota templates https://templates.blakadder.com/sonoff_TX-T0EU2C.html

:)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/davidramosweb/home-assistant-custom-components-cover-time-based/issues/7#issuecomment-778102788, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANCEUS2VAW5Y6WMMMLNJ7ATS6T46PANCNFSM4XQJ4QOA.

marcelrealsolutionsnu avatar Feb 12 '21 12:02 marcelrealsolutionsnu