Entities Disappearing

Hi HA Community,

Long time HA user and I’m running 3 different instances at 2 different properties. On one of my instances I’ve started to have issues with a couple entities disappearing. Of note, these are not entities tied directly to physical devices. Two in particular are group.family and binary_sensor.good_night. Here are their definitions in YAML configuration files:

In magic_house.yaml:

binary_sensor:

  - platform: template
    sensors:

      good_night:
        friendly_name: "Good Night"
        value_template: "{{ is_state('input_boolean.good_night', 'on') }}"

And in my groups.yaml:

  family:
    name: Family
    entities: 
      - person.XXXXXXX
      - person.XXXXXXX
      - person.XXXXXXX
      - person.XXXXXXX
      - person.XXXXXXX

After a few hours to a few days I start to see log errors about these two entities not being found:

Logger: homeassistant.components.automation
Source: components/automation/__init__.py:1020
Integration: Automation (documentation, issues)
First occurred: 1:30:00 PM (3 occurrences)
Last logged: 2:00:00 PM

Error evaluating condition in 'Locks - Check Owner Lock Status': In 'condition': In 'state': In 'state' condition: unknown entity group.family

There are obvious useful error messages in the homeassistant.log and I’m not really sure where to start looking to debug this issue. Anyone seen a similar issue or have a suggestion of where to look?

Thanks,
Alan

I just recalled that these were two of a couple entities that I have shared with a second home assistant instance via the HACS integration Remote Home-Assistant. Disabling that integration seems to have resolved the issue.

Details:

HA1 - the instance that was loosing several entities, HA1 was a remote node for HA2 and the entities I was loosing were being shared to HA2. HA1 was also accessing HA2 via Remote Home-Assistant which I didn’t disable.

HA2 - I disabled this instance from accessing remote node HA1 via Remote Home-Assistant. This node is still configured as a remote node for HA1.

I did notice that HA1 didn’t have the remote configuration entry in configuration.yaml for Remote Home-Assistant. So it is possible that this was the problem, but I’ve not yet tested that.