home-assistant / home-assistant/iOS
macOS Primary Display sensor has no state when Mac isn't connected to display
- Dominant language
- Swift
- Stars
- 2.4k
- Forks
- 520
- Avg merge
- 7h 27m
- Merged PRs (30d)
- 264
Description
**Device model, version and app version**
Model Name: M4 Mac mini
macOS Version: 15.2 Beta (24C5089c)
App Version: 2024.11 (2024.976)
Safari Version: Version 18.2 (20620.1.16.11.6)
**Home Assistant Core Version**
2024.11.3
**Describe the bug**
Bought a M4 Mac Mini and currently using it headless without a monitor (accessing via screen sharing from my other Mac). Noticed that the `sensor.primary_display_name` does not have a state in this scenario. IMO it should have some kind of state like "Disconnected" or "N/A" for both automation and dashboard purposes. I'd like to hide the dashboard card using conditions in this scenario.
Additionally, the `sensor.displays` is showing that I'm connected to 1 display even though that hasn't been true for several days. I briefly had the mac mini plugged into my HDTV via HDMI, but it's been unplugged for a while now and should be displaying 0 instead of 1. The `sensor.primary_display_id` is also showing stale data (UUID for a display that's not connected anymore).
**To Reproduce**
Unplug Mac from display
**Expected behavior**
Contributor guide
Assessment
This issue has not been assessed yet.