[Q} More detailed user states

Hi all,

I’m getting stuck on something I would like to have.

I would like to have more user states than the things I have currently installed.
For example, I would like to have the following states:

  • Home
  • Away
  • Driving
  • Sleeping

The part that is done so far is Home and Away (with presence tracking trough my Ubnt AP).
But now I would also implement a sleeping state (so I can take it up in my automations to turn lights off when I’m sleeping and my girlfriend is out).

I can detect my sleep state with a Tasker API call (I’m currently handling sleep state with OpenHAB, but I would like to have this option in Home Assistant so I can shut down OpenHAB).
Is it possible to make an API call to set my state to sleeping for example? Tasker is currently sending an API request when I put my phone on my wireless charger and that is (in my oppinion) enough to detect my state.

Thank you all for your imput.

Yeah. With Tasker, if memory serves, you’ll need a plugin that’ll generate Post calls (instead of Gets), but that’s totally doable. I have Tasker watching alarms on my phone to turn on lights in the house when they trigger.

I keep input_booleans for awake/asleep for myself and my wife. When one is true, some lights turn off in the bedroom. When both are off, all lights, tv, etc get turned off.

Look at the “services” tab of HASS’ ui (bottom of the sidebar - looks like a remote control). Here’s some info on how to find the correct URL to activate anything within HASS:

1 Like