Pseudo Entities

I’m sure this has been answered elsewhere, but I just can find the right topic.
I am trying to create ‘pseudo’ entities that I can show the status of, create automations on, check the statistics of, etc.
Ex.
I want to create an entity that is the logical AND of two device trackers that I pull from my router. I want to be able to create a house icon and change the color from Green (occupied) to Red (unoccupied). I need to keep track of the time the status changed and send text messages based on the change.

Similarly I want to do the same thing for my irrigation system. If any one valve is open, then show the Irrigation entity as being on, and when all are off show entity as off.

Another, if either thermostat is showing heating then show HOME as heating - same for cooling.

There are many more summarized statuses that I need to be able to monitor.

TIA,

Walt

Isn’t this a template sensor? Based on the state of the device trackers?

Maybe, but aren’t sensors really analog devices? Regardless, I have yet to fully understand how to implement template sensors.

Sorry - I meant sensor as opposed to entity. Template binary sensor, then?

If creating a "Helper’ is the same thing, then yes, But I do not have any of the statistics I would like to track like time of last change…
I actually created input_boolean, not binary sensor

Unless I just need to create additional helpers with similar names and then programatically fill in those values

I’ve finally figured it out. Thanks for the input.