hiscorebob
(Hiscorebob)
November 5, 2019, 11:10am
1
Hi,
I’ve setup a view in Lovelace that I want to cast to a device.
Here’s how it looks on an 10" Android Tablet (1280*800 resolution)
When casting to a Full HD Device, sizing of Cards is wrong, and much less information can be displayed:
Any idea what’s happening? Or maybe a parameter that I’ve overlooked (scaling?)
Thanky for any advice.
hijinx
(James)
January 3, 2020, 11:32pm
2
Ever find a solution for this?
blyons
(Bill Lyons)
February 20, 2020, 11:52pm
3
Still no answers? This will determine whether this feature is viable for me or not…
hiscorebob
(Hiscorebob)
February 24, 2020, 7:39pm
4
Never found an answer to this (but I didn’t look into this either)
I’m sorry, I know the thread’s over 2 years old. I’m having this issue still, is there any solution that was ever found?
avd706
(Avd706)
June 22, 2022, 12:02am
6
try the lovelace horizontal stack card and force 4 across?
BustaC
(Busta C)
July 10, 2022, 9:37pm
7
It’s a bit hacky, but works for me. I’m using it to just target TVs as my layout is fine on my hub
add a file to /config/www called overrides.js and paste in this
class ResizeCast {
constructor() {
const home_assistant_main = document.querySelector("hc-main");
home_assistant_main.style.setProperty('zoom', 0.75); // zoom out to 75%
window.dispatchEvent(new Event('resize'));
const bg_element = home_assistant_main.shadowRoot.children[0];
bg_element.style.setProperty('min-height', '200vh'); // makes sure background goes the the bottom of the display by making it 200% high
}
}
const isTouchDevice = () => {
return (('ontouchstart' in window) ||
(navigator.maxTouchPoints > 0) ||
(navigator.msMaxTouchPoints > 0));
}
const bases = [
customElements.whenDefined('hc-main')
];
Promise.race(bases).then(() => {
// don't bother if we're on a hub
if (!isTouchDevice) {
window.setTimeout(() => {
window.resize_cast = window.resize_cast || new ResizeCast();
}, 1000); // apply after 1000ms
}
});
Go to settings / dashboards / resources and add a javascript module with the path /local/overrides.js
Restart your chromecast devices and your dashboards should now be 75% of their normal size.
1 Like
rodrigodf
(Rodrigo Fraga)
October 28, 2022, 9:55pm
8
I tried to use your script but it didn’t work, were there any changes or updates?
blyons
(Bill Lyons)
October 29, 2022, 11:07pm
9
2 Likes
BustaC
(Busta C)
November 2, 2022, 10:46am
10
What were you trying it with? Chrome cast, chrome tv, or one of the hubs?
rodrigodf
(Rodrigo Fraga)
November 2, 2022, 9:41pm
11
I’m trying on a tv with buildin chromecast
Wusser
(Wouter)
December 12, 2022, 9:08pm
12
Also doesn’t work for me unfortunately. I am using Chromecast with Google TV 4K on a 27 inch 4k monitor.
domeassist
(Domeassist)
October 24, 2023, 3:19am
13
Displays way too big on my built in Chromecast too!
Also cannot control anything with the remote?
What’s the point of this functionality?
JensB82
January 16, 2024, 3:39pm
14
Hi, i also tried to fit my dashboard on a 43Inch 4K Display. You only can a small part of the dashboard. Does anyone know, if there will be a feature for this in future? I would like to show some stats and weather casts on my screen vis Google chromecast.
HiTechTLS
(Dan Miller)
January 22, 2024, 6:10pm
15
Digging up graves as well. This seems like a great feature to have. Searching for a way to solve it on my Chromecast Ultras on both 1080 and 4K displays, where the content casted is far too large.
Good solution is Android Debug Bridge and command
am start -a android.intent.action.VIEW -d https://your.url