frontend
frontend copied to clipboard
Scenes not visible on macOS Safari
Checklist
- [X] I have updated to the latest available Home Assistant version.
- [X] I have cleared the cache of my browser.
- [X] I have tried a different browser to see if it is related to my browser.
- [ ] I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.
Describe the issue you are experiencing
On macOS with Safari the (zigbee2mqtt) scenes are not visible in the szenes tab. In the companion app on iOS they are visible!
Logger: frontend.js.latest.202405011 Quelle: components/system_log/init.py:333 Erstmals aufgetreten: 31. Mai 2024 um 09:35:30 (29 Vorkommnisse) Zuletzt protokolliert: 31. Mai 2024 um 10:03:23
Uncaught error from Safari 17.5 on Mac OS 10.15.7 RangeError: number argument must be finite format ([native code]::) isUnavailableState (src/panels/config/scene/ha-scene-dashboard.ts:278:31) row (src/components/data-table/ha-data-table.ts:485:50) map ([native code]::) map (src/components/data-table/ha-data-table.ts:457:39) s (src/directives/repeat.ts:57:32) t (src/directives/repeat.ts:94:6) t (src/lit-html.ts:1085:33) this (src/lit-html.ts:1362:29) t (src/async-directive.ts:366:29
Describe the behavior you expected
Scenes should be visible
Steps to reproduce the issue
- Open the Scenes-Window on macOS with Safari
...
What version of Home Assistant Core has the issue?
2024.4-2024.5.5
What was the last working version of Home Assistant Core?
2024.3
In which browser are you experiencing the issue with?
Safari on macOS
Which operating system are you using to run this browser?
macOS Sonoma 14.5
State of relevant entities
No response
Problem-relevant frontend configuration
No response
Javascript errors shown in your browser console/inspector
No response
Additional information
No response
With the new HA Core 2024.6.4 an HAOS 12.4, the error still exists.
If I try to sort the not displayed scenes by name, the following is in the logs:
`Logger: frontend.js.latest.202406101
Quelle: components/system_log/__init__.py:333
Erstmals aufgetreten: 17:29:21 (3 Vorkommnisse)
Zuletzt protokolliert: 17:29:23
Uncaught error from Safari 17.5 on Mac OS 10.15.7 RangeError: number argument must be finite format ([native code]::) isUnavailableState (src/panels/config/scene/ha-scene-dashboard.ts:296:31) row (src/components/data-table/ha-data-table.ts:485:50) map ([native code]::) map (src/components/data-table/ha-data-table.ts:457:39) s (src/directives/repeat.ts:57:32) t (src/directives/repeat.ts:94:6) t (src/lit-html.ts:1085:33) this (src/lit-html.ts:1362:29) t (src/async-directive.ts:366:29)`
Congratulations, now with Core 2024.7.3 I also have the error with the companion App on iOS!
@homeassistant And so far no one has addressed my problem. 😞
Logger: frontend.js.latest.202407100
Quelle: components/system_log/__init__.py:333
Erstmals aufgetreten: 00:42:23 (16 Vorkommnisse)
Zuletzt protokolliert: 00:43:37
Uncaught error from WebKit 605.1.15 on iOS 17.5.1 RangeError: number argument must be finite format ([native code]::) isUnavailableState (src/panels/config/scene/ha-scene-dashboard.ts:309:31) row (src/components/data-table/ha-data-table.ts:572:51) map ([native code]::) map (src/components/data-table/ha-data-table.ts:567:27) map ([native code]::) map (src/components/data-table/ha-data-table.ts:516:34) s (src/directives/repeat.ts:57:32) t (src/directives/repeat.ts:94:6) t (src/lit-html.ts:1085:33)
The number/ count of the scenes in header is correct, but nothing is listed.
If nobody can reproduce your problem, it's most likely to stay unaddressed unless somebody can. Cross posting your issue onto different issue trackers doesn't help.
The only advice I can give is: go to the developer tools, page states, filter on entities starting with "scene." to see if there's a special state somewhere. You can also post here the resulting list if you want, but you're down to somebody that wants to dedicate his free time to your issue.
@silamon Thank you very much for your response. Sorry for the cross posting, but since I didn't get a response in the frontend tracker and it's now in the companion app with the last core update, I thought it might belong in the core tracker.
I checked the states. I use Python scripts and automations to set a fictitious state (on and off) for scenes. These are displayed accordingly in the developer tools. To test it, I deleted the state manually using the developer tools. But still nothing is displayed.
For another test, I created a scene directly via the Home Assistant UI. Without making any changes to the state. But this scene is not displayed either. However, the number in the header of the scene overview has correctly increased by one.
To me it looks like it's not the states or zigbee2mqtt, right?
It's most likely (at least) one of your 21 that causes the full table to not display. You may want to use the developer tools https://support.apple.com/en-mt/guide/safari/sfri20948/mac and https://www.geeksforgeeks.org/debugger-in-apple-safari-browser/ to place a breakpoint on the file located at src/panels/config/scene/ha-scene-dashboard.ts line 278. That will be hitted for every scene in the same order of appearance in your scenes.yaml. When it no longer hits the breakpoint, the last scene that hitted the breakpoint is the troublemaker. Since I don't have experience with safari, it may or may not work.
Edit: It's most likely the state of a scene that's causing the issue: https://github.com/home-assistant/frontend/blob/88a33bee14ef835963d843b58466660d29c0e100/src/panels/config/scene/ha-scene-dashboard.ts#L299-L302
Edit: If you have another browser like chrome or firefox installed on mac, you can also try with this browser.
Thank you very much for your support and tips to find the error.
I won't be able to test all of this until later. Just one thing in advance, the zigbee2mqtt scenes are not saved in the scenes.yaml. But I will try other browsers.
Okay, I've tried it with firefox. Same issue but the log says something different with date instead of number:
Logger: frontend.js.latest.202407100
Quelle: components/system_log/__init__.py:333
Erstmals aufgetreten: 10:23:43 (1 Vorkommnisse)
Zuletzt protokolliert: 10:23:43
Uncaught error from Firefox 128.0 on Mac OS 10.15 RangeError: date value is not finite in RelativeTimeFormat.format() selectUnit (src/common/datetime/relative_time.ts:18:36) isUnavailableState (src/panels/config/scene/ha-scene-dashboard.ts:309:31) template (src/components/data-table/ha-data-table.ts:551:25) map (src/components/data-table/ha-data-table.ts:516:34) renderRow (src/components/data-table/ha-data-table.ts:328:11) item (src/virtualize.ts:113:51) t (src/directives/repeat.ts:57:22) ct (src/directives/repeat.ts:93:52) update (src/directive.ts:134:16) _$AS (src/lit-html.ts:1085:23)
Is it possible that a date (last changed) is expected as state?
What's strange is that it only appeared on macOS since core 2024.4 (the new data tables) and on the companion app since core 2024.7.3.
It's still somewhere a state attached to a scene that can't be displayed. Can you post the scene states from the developers tools?
Can you also try safe mode (check off the last checkbox)? What integrations are providing your scenes?
The scenes come from zigbee2mqtt. In the screenshot scene.test I created it today directly with HA UI, as I wrote before:
I can reproduce it now by setting a scene state to "off".
Oh! Okay, then you've probably found the origin. Even if "on" is set?
Thank you for testing!
It would be sad if I couldn't use the states "on" and "off" anymore. 😟
I went to look it up in the documentation, and "on" and "off" are not correct states for a scene. If a custom component is providing them like this, you should open an issue at the repository of the custom component. It should be a date or left undefined when it was never triggered before. That said, I'm going to close this one as there's nothing more we can do.
As i wrote before, i set the states "on" and "off" by myself with automations and Python Script.
That said, I'm going to close this one as there's nothing more we can do.
Maybe you could allow states like "on" and "off" too? And only empty state is not allowed. Or release statefull scenes?
Our issue tracker is for bugs only, since it's no longer a bug there's nothing more we can do in this issue, I should have been more clear about that. What you're asking for is more a feature request now, which you can post at the forum (https://www.home-assistant.io/help/).
Okay, I'll do that. But thanks again for your time! Now at least I know what the problem is. But it's strange that it only appeared in the companion app since 2024.7 and in the browser on macOS since 2024.4.