Homematic IP Cloud - Sensor triggers automation because of disconnect


I created an automation which is triggered by an Homematic IP window sensor.
Unfortunately my Internet provider disconnects once every 24h, this takes ~5 sec. to be back online.
But this causes my automation for sensor closed to be triggered, since the sensor was not reachable, and after connection is established the state goes to closed, which starts the automation.

I tried to use a timeout, but this doesn’t help, since the door keeps closed ofc. so the automation is just started delayed.
Is there an option to ignore a lost connection?


No idea if this is possible in the cloud solution, but the CCU solution has an option to wait a set amount of time before the state change is reported.

Thanks a lot for the answer.
Not completly sure what you mean, so you can set a delay before the change is reported inside the CCU?
So that’s also possible in the cloud solution, but suppose it won’t help, since the sensor doesn’t change it’s state, so also on Homematic side there is no delay, because no state was changed.
It was clsoed before and after, but I’m losing internet connection, which is detected by Homeassistant.
after reconnecting (~5s) the sensor is available in Homeassistant and then Homeassistant starts the automation.
So this can’t be influenced by Homeatic IP, this would need to be handled inside of the homeassiatant integration, a reconnected sensor need to be ignored in automation trigger.

Unfortunately probably not possible? :frowning:
So this means my google cast devices are yelling at me every night at 03.00am that my garage has been closed.

Ahh, I see.
I guess you best bet is then to try to make a template sensor to handle it.
Something like the below where the if statement only have options for open and closed and not for unavailable.

sensor homematic:
  - platform: template
        friendly_name: "room1_window_sensor"
        value_template: >-
          {% if (is_state('binary_sensor.room1window','closed') %}
          {% elif (is_state('binary_sensor.room1window','open') %}
          {% endif %}
        icon_template: >-

Thanks a lot!!! :grinning:

I am pretty new to Homeassistant, installed it yesterday so it took me a little time to figure out how to use templates. However, seems to work (could not test a real connection loss yet, so I need to wait to tonight). But looks promising.

And actually after i was successful with the template, I realized that there is also a trigger type called “State” in automations, there I can also just use from “on” to “off”. Instead of using a device trigger.
So the template sensor is not even required (but always good to learn new stuff).

Thanks again for putting me in the right direction!

You saved me from being disturbed each night by an annoying automation.

Well, I am pretty new to HA myself, but I think beginners have alot of the same problems, and my method might not even be the best solution. :slight_smile:
HA seems to be a endless project of refinement.