Two switches to change state of a binary sensor

Hello,
I am hoping someone would have the time to point me in the right direction. I am a newbie to this and so need a basic answer.

I have a skylight in my roof which I can operate with a switch.skylight_l1 to open it and switch.skylight_l2 to close it. The switches run for ten seconds to operate the motor and then turn off.

I can not fit a open/close door sensor to the skylight as it is too high up to reach and change batteries.

Is it possible to create a binary sensor which will show open/close depending on which switch was the last to operate. I suspect people have done the same for garage doors or similar but I can not find any answers.

You can use Settings/Helpers to create an Input Boolean for the skylight state. Then you’d use the automations that open and close the skylight to additionally turn the input_boolean on or off.

thank you so much

1 Like

for what it’s worth, you could use an old-school wired door/window switch (assuming you don’t mind getting up there once to mount it), then wire that into some other device that is in a more accessible area to interface with your HA system.