Change person entity state

Hello

I would like to create an automatisation to change person state from not_home to home and home to not_home.

I do not find a way to do it in automatisation. There is no service for change persone state.

Someone have an idea how to do it?

Thank

I just commented on a similar request in another thread here: How to say who is home right now?

Also some other solutions presented in that thread as well.

Hope it helps!

Thank you.

I am not sure is the same question.

What I want is when the front door open between 4 and 4 Pm set person location to home.

It is for when my children come back from school set them at home.

I see. I personally have not used the ‘person’ functionality in HA.

I do use these custom-variables custom_component often: Set variables, custom component variables

It allows you to define and then set variables (who’s status survives reboots) via script.

You could essentially build a variable.kids_home and set it to either home or not_home based on the triggers you’d like?

I will say, triggering based on door open / closed could trigger false-positives quite often. Having kids myself, I know they’re always opening the door when friends come over, to go get the mail, etc. Anyhow, just my $.02.

Thank for the idea, it sound good :slight_smile: I will try with set variables, custom component variables

My kids are young so they have an adult with them to open the door :stuck_out_tongue: is should be ok to start buth when the will grow up I will have false-positives :stuck_out_tongue:

Hello. I’ve tried to update/change a variables value and/or its attributes in node red with call service nod, but it doesn’t work. Node configuration:
Server: Home Assistant
Domain: variable
Service: set_variable
Entity Id: variable.example_123
Data: { “value” : “{{Buterbrod}}”}
And… Debug: “Call-service API error. Error Message: extra keys not allowed @ data[‘entity_id’]”
What should I do to make it work?

device_tracker:
  - platform: mqtt
    devices:
      fakedevice_person1: 'home-status/person1'
      fakedevice_person2: 'home-status/person2'
    qos: 1
    payload_home: 'home'
    payload_not_home: 'away'

set up your automation to call service mqtt.publish.
topic: “home-status/person1”
payload: “home”

select your person1’s device_tracker.fakedevice_person1

1 Like

Thank you Jennifer for the great idea. Its works. I am able to detect either one of these: PING, ZONE and NMAP on fast trigger state.

[How to publish MQTT topic and payload in automation action]