Disable animations
First of all: I love your work.
I've been testing it and it seems very useful and works surprisingly well on such slow hardware. The one thing causing issues for me are animations on the hass frontend.
I've found this feature request https://community.home-assistant.io/t/performance-mode-disable-ui-animations-per-device/879076/3
The last comment mentions Home Assistant will disable some animations if the browser is configured for reduced animations.
This (https://stackoverflow.com/a/79465803) stackoverflow post mentions chrome (so i'm assuming chromium as well) can be forced to trigger that with a command line flag.
--force-prefers-reduced-motion
Since animations will almost always trigger a lot of tile updates i guess this would be a good fit?
Sounds good and easy to add. But I’ve just enabled emulation of this flag via DevTools and see no effect.
Maybe try it and let me know if you see any differences. DevTools → Rendering → Emulate CSS media feature: prefers-reduced-motion If you don’t see “Rendering” as a tab there, press Ctrl/Cmd+Shift+P → type “Show Rendering” → hit Enter.
PS I use Bubble Card, in which animation can be disabled via a custom module (CSS).
That's a bummer, I can confirm it has no effect for me either. If you are interested in adding option to the server later (either always on or configurable). I will create a test-page to see if it works there and confirm the "problem" is with HA. If so i can see about creating a PR to add the behavior to some key places.
Main culprits for me are:
- Clicking a sensor value (or a badge) this opens a "fullscreen" modal (for these small screens) and animates the whole screen.
- https://github.com/Gh61/lovelace-hue-like-light-card which does the same animation when opening and also animates light scene changes on the whole card.
Especially for that last one and other custom cards getting support for this should be fairly easy.
Okay, I’ll add it as a server-configurable option only. I’ll ping you here when it’s ready (probably in a few days).
@martijnve, please check v1.0.2.
Also, the PREFERS_REDUCED_MOTION option was added to the Docker Compose example.
If enabled, the container should log:
[browser] Launching with prefers-reduced-motion
This is a nice feature - but just to confirm, most of HA doesn't respect this setting as of current, correct?
I just tried it out and when tapping a light entity, the brightness control still fades in. I assume those need to be made aware of the setting in the HA codebase as alluded to above?
This is a nice feature - but just to confirm, most of HA doesn't respect this setting as of current, correct?
Correct.
Sorry if im doing something dumb, this is my first custom add-on.
I cant seem to update past 1.0.0 to test this.
Ive added https://github.com/strange-v/RemoteWebViewServer and even after removing the addon and the repo and adding everything again im still at 1.0.0
I cant seem to update past 1.0.0 to test this.
Are you sure the issue isn't on the client side? Make sure you have the refresh: 0s line in particular:
external_components:
- source: github://strange-v/RemoteWebViewClient@main
refresh: 0s
components: [ remote_webview ]
And then don't forget to update your device(s)
the addon page says this:
Remote WebView Server Current version: 1.0.0 (Changelog)
HA OS gets the version from config.yaml; bumped it there. I’m not sure whether a re-release is required.
@martijnve, if it still doesn’t work, please create a separate issue, as it’s not directly related to this thread.
yeah that worked. Is there a way to configure the prefers_reduced_motion env var through the HA addon config?
Added in 1.1.2