#Location information is missing

1 messages · Page 1 of 1 (latest)

small wing
#

The original question started here https://discord.com/channels/330944238910963714/1285303054547026015 and I was directed here.

It seems like person home/away data is disappearing after 2 days.
The first thought was this could be due to the recorder setting (that is white listing entities).

recorder:
  purge_keep_days: 31
  commit_interval: 30
  include:
    entity_globs:
      - sensor.ble_*
      - sensor.shelly3em_channel_a_*

But then again, the person entities are not even listed on /developer-tools/statistics

Any pointers how to debug this much appreciated.

Goal: I would like record the home/away times of the persons.

tacit arrow
#

When you use include with recorder you are implicitly excluding everything else, including your person data. So that won't be recorded at all.

#

So can you explain why you are doing that?

small wing
#

@tacit arrow I am fine with white listing. If it's just that I could just add person.*

... but looking at /developer-tools/statistics it seems like person.* is not even an option to include.

#

And I would still like to understand why the data is available for 2 days (if it's excluded from recording).

small wing
tacit arrow
polar sluice
small wing
polar sluice
#

Not unless it's a sensor with a state_class so I can only recommend you to make a template sensor then out of your person entities and include that in your recorder

small wing
#

Ah, that's kind of a "virtual" sensor then?

polar sluice
#

Exactly

small wing
#

Something along the lines of

template:
  - binary_sensor:
      - name: Person Foo is home
        state: >
          {{ is_state('person.foo', 'home') }}

but I assume I also need the storage class added?

#

Or do I need to use the device_tracker directly?

polar sluice
#

That's a binary sensor, it has to be a sensor.

small wing
#

A binary sensor is not a sensor?

#

That's confusing.

#

You mean it has to have a decimal value?

polar sluice
#
template:
  - sensor:
      - name: Person Foo is home
        ...
#

But I think if you perhaps make it in the UI it's easier

small wing
#

what about state_class?

polar sluice
#

State class has to be measurement

#

Perhaps something like this (as the state needs to be a number)

#

Not an expert in templating so there maybe someone else can shime in, in #1284966664357810196 if needed

small wing
#

but the gist is that is has to be decimal value and so I map the binary to a decimal 0/1, correct?

polar sluice
#

It has to be a numeric value so in the example I gave in the picture it will "translate" true/false to 1/0.

#

But it's just an example but for long-term stats to work it needs to be a numeric value

small wing
#

I tried this a bit more. To track this down futher I've set up push notification whenever someone leaves or enters the house. The iPhone that does not have anything extra installed works sometimes (but not reliable) and the other iPhone that is even running the HA app does not report location changes at all. This is rather frustrating.

Is there a good way to debug this without physically entering/leaving? Sure, workout is good but.... 🙂

polar sluice
#

Above you only refer to the person entity so we would have to know which device trackers are attached to the person to give some advice.