My binary_sensor.xxx_xxx_active is AWOL

For months (years?) I’ve had a binary_sensor.office_imac_active sensor that I use for automations. Although I’m not aware of having made any unusual configuration changes, that sensor was suddenly gone, and nothing I tried would restore it.

App: Home Assistant Companion 2023.2 (2023.444)
Server: Home Assistant 2023.2.0 Supervisor 2023.01.1 Frontend 20230201.0

In the app’s Preferences | Sensors I saw Active set to true.

In Home Assistant itself, under Developer Tools | States I still saw these entities being updated:

device_tracker.office_imac
person.office_imac

I tried:

  • rebooting (not just restarting) everything
  • disabling and re-enabling the Active sensor in the app
  • deleting the app and all of its settings using a cleaning app; reinstalling, etc.

I was flummoxed. I looked at the contents of a week-old full backup file and checked the core.entity_registry. Sure enough, the entity was there:

  {
    "aliases": [],
    "area_id": null,
    "capabilities": null,
    "config_entry_id": "e93b6fdc6e7fd053e138968b855501ca",
    "device_class": null,
    "device_id": "d0525e758d5cb2b6ec74399ed74e2d6c",
    "disabled_by": null,
    "entity_category": null,
    "entity_id": "binary_sensor.office_imac_active",
    "hidden_by": null,
    "icon": null,
    "id": "4f741b86307fd6c3ce79f0eada29b87c",
    "has_entity_name": false,
    "name": null,
    "options": {},
    "original_device_class": null,
    "original_icon": "mdi:monitor-off",
    "original_name": "Office iMac Active",
    "platform": "mobile_app",
    "supported_features": 0,
    "translation_key": null,
    "unique_id": "86775f4d6edc69d967edf5719e9249a587d8dac99f241a7b32e66fbf6dfb73d6_active",
    "unit_of_measurement": null
  },

So I did something kind of reckless – I added the above entity back to the core.entity_registry and rebooted. Now, although the entity does show in States, it’s ‘unavailable.’

Any help most appreciated.

I don’t believe it should change the existing entities, but if you recently upgraded to macOS 13, your device was probably renamed to “iPad” (Apple intentionally broke our ability to read device names on iOS, and carried the problem over to macOS without a way around it) which you can rename back in the configuration for the server within the app’s preferences.

Excellent! I renamed the entity back to its original in Home Assistant, and I changed the name in the app’s preferences. Rebooted, everything’s now working again. Thanks very much.