You can create a template sensor from the input_boolean.
- platform: template
sensors:
mike_home_sensor:
friendly_name: Mike
value_template: >
{% if is_state('input_boolean.mike_home', 'on') %}
home
{% else %}
not home
{% endif %}
not sure if it will appear/disappear based on presence, but it will at least show home and away instead of on/off
awesome thanks! I was able to get this implemented but I wanted something more like the attached photo. where the stats shows up under the icon of the sensor.
Ah, those are device tracker entities. I donât think there is a template device tracker available. I personally use the Home Assistant iOS app for to actually show location in HA. But use the HomeKit input boolean for triggering automations, as it has been much more reliable.
Hi, when you use the HA iOS app, are you using it via SSL to access your instance outside of the network? I am curious, as I am considering doing just that (plus Homekit) instead of cloudMQTT/Owntracks if it accomplishes the same thing. At the moment I am using a combo of homekit, cloudMQTT, and bluetooth for presence detection with varying success⌠and by varying, I mean barely.
Right, your HA instance needs to be eternally accessible by the iOS app in order to make real use of the gps. I am using a reverse proxy setup, but you could also do something like duckdns.
The HomeKit setup has been rock solid for me. And the iOS app has been working great as well.
That sounds perfect, thank you. I have setup DuckDns and have it working, although I had to install Dnsmasq to access the instance locally.
I am interested in the reverse proxy idea though, would the âNGINX SSL proxyâ add-on be the correct way to go about this?
edit: Through a bit of trial and error, its up and running wonderful. Using the dnsmasq on the phones that I want tracking enabled outside the home, other than that the proxy is great to still use my hassio local on computers not tied to the device_tracker. This thread has been a great help.
Can someone clarify how this is supposed to be set up for multiple people? Iâm finding the wording to be a bit vague. Iâve followed the instructions for adding the settings in configuration.yaml, (I literally copy/pasted the OP settings because they fit my goals), and Iâve used the PIN to connect HA with the Home app on my phone. Now I have two input_booleans on my phone which is where the confusion comes in. Wouldnât I need only one input_boolean on my phone?
Also, how do I add my wifeâs phone into the mix? Are we supposed to share an Apple ID for this to work?
You invite your wife to your âhomeâ in HomeKit then you both will see both input booleans (because they are just 'switches" to homekit).
Make two rules in homekit for each input_boolean: One that turns input_boolean 1 off when you leave and on when you arrive. Then one that turns input_boolean 2 off when your wife leaves and on when she arrives.
You can use either phone to make the rules (or the Home app on a Mac for that matter).
OK, I think I understand now. I create all of the automations in Home and by sharing my âHomeâ with my Wife, she too will have access to the automations.
I like the sound of this and will be looking to implement. But how do you protect from âHey Siri, turn everything offâ. Wonât that set my presence as away also?
I have no idea - Iâve never asked Siri (or Alexa) to âturn everything offâ - I have scenes set up to do that. I would imagine if you have anything in HomeKit thatâs not a light, âturn everything offâ is probably not what you want (i.e., water valves, heat, garage doors, etc.)
My use case is I use HA to control everything and Alexa to control HA. I needed some more reliable presence than the iOS was giving me, so I came up with this method. Even though I have the HomeKit component active with most of my HA stuff exposed to it, I rarely ask Siri to do something.
I basically have two scenes: one is called âBedtimeâ which has all of my lights and TVs off; the other is called âAwayâ which adds in the ceiling fans and thermostat to Away. The latter is activated automatically by HA when our phones are gone.
I am having a problem with homekit due to adding the filter to the homekit section.
What happened is that I lost all the switches/sensors that had been mapped to homekit, and only have the presence detector sensors defined above. Previously, my homekit section in configuration.yaml was empty.
What do I need to add to the filters section to bring all of them back? I have been searching home-assistant and google for examples, and have come up empty for a solution to adding back everything.
The filter section is completely optional, you can just delete those lines. It sounds like your configuration before was just the "homekit: " line, and thatâs all you need - it will show everything by default.
Filter option is basically for restricting which things show up in the Home app. You can read more about how it works here.
What you did should have worked. Without the âfilterâ code in place, it should show everything including your input_boolean presence detection stuff too.
Perhaps you need to restart Home Assistant, or maybe the input_boolean presence detection switches got added to a different room (in the Apple Home app, check the âRoomsâ tab and swipe through it - mine are in the âDefault Roomâ which is not immediately visible unless you swipe).
If that doesnât work, Iâm not sure, maybe someone else can help.