First of all thank you to all in the forums, reddit and github for contributing to this amazing project called HA. I am a complete noob and have learned so much over the past few months to get a decent smart home up and running.
The issue I am having is with my Aqara fp2 presence sensor. The entity reports states as detected or clear. I have one in my living room that has 2 zones one for the sofa, and one for the rest of the living room.
With my research I thought creating a tempalte sensor to combine both entities into one would work, but its not working. The sensor shows “clear” at all times even if presence is detected.
The automation I am trying to create is if there is no presence detected for 10 minutes, and the TV is on. To turn the TV off.
I used somebody’s code on Reddit for a template sensor as well as ChatGPT to help me write this. It simply does not work.
Things I’ve tried:
-Aqara FP2 sensor works fine, entities report correct states
-Logs show no errors or issues
-If I run the automation, it works - since the sensor shows “clear” even if it is not
If a template sensor isnt the best way to do this, I am open to suggestions
P.S: Why does HA not allow to check current states of entities? For example, I have alot of automations in mind with the presense sensor, but the automatiosns only run when the state is CHANGED from clear TO detected or vice versa.
Is there anyway for an automation to simply check what the current state of the entity is?
Triggers are event-driven. This is done because it is more efficient, robust, and less dependent on the operating system timing compared to continuous polling.
Conditions can be used check an entity’s current state once an automation has been triggered.
A binary sensor’s actual state will never be “detected” that is just the “friendly” frontend representation given to occupancy sensors. A binary sensor’s actual state is either “on” or “off”.