b0mbays / continuously_casting_dashboards

HACS Integration for continuously casting a Home Assistant dashboard to your Google Chromecast Displays
MIT License
183 stars 9 forks source link

{feature request] Start/Stop casting based on entity state #23

Closed FlexxFR closed 1 month ago

FlexxFR commented 1 year ago

Hi, is it possible to set the time window based on entities or use the state of another entity to start/stop continuously casting? It possible to switch between views, but not to start/stop.

use case: I use several hubs as alarm clock but during day-time as "room-controller".

I would like to cast until the specific room goes into "sleep mode" (helper value) , than it should just be the default dimmed clock. In the morning (after the variable alarm clock) and after wake-up, it should start casting again. Of course, these times are different each day so a fixed time window will not help.

Would be great if some optional entity value could be used to start/stop CCD.

FlexxFR commented 1 year ago

For now I created a work-around by using conditional cards to "toggle" between views and one of the views is a HA dashboard mimicking the clock. So basically I'm now casting 24/7 a version of the dashboard.

Switching views based on entities didn't work for me.

I'm still to have a feature to start/stop casting based in a entity value

b0mbays commented 1 year ago

Hey @FlexxFR if I get some time over the weekend i'll take a look at doing this. I'd need to implement some form of toggle between time based casting and entity casting. I'll let you know 👍

FlexxFR commented 1 year ago

Nice, @b0mbays . Maybe you can make something similar as the current state_triggers but use a start/stop toggle instead of another dashboard url?

Another question: I tried to remove all start/end times and assumed 24/7 casting, but still the defaults are used. Is this intended?

b0mbays commented 11 months ago

Hey @FlexxFR - Yes that is intended. Unfortunately with how it's been implemented there is no "24/7" casting option currently. You can get pretty close enough though with 1 minute being not being casted. Also, it's probably a bad idea to constantly cast the same screen to these devices can suffer from burn in.

flyize commented 10 months ago

Any headway on this? I need to be able to toggle this off on occasion.

edit: If it matters, my use case would be to turn this off so that I can use WebRTC/dash_cast to cast my front doorbell when Frigate detects a person.

iamer commented 4 months ago

I have a similar setup, but I use wallpanel (from hacs) with "screensaver_entity" config and a randomly changing background. I ended up here because I was searching for a way to trigger recasting for any reason without having to restart homeassistant. For example casting to my google nest hub randomly stops if WiFi drops.

Maybe a service to start / stop casting can be implemented?

heisenberg2980 commented 1 month ago

@b0mbays do you have any update about this? I would like to mimic what google does so the screen only displays the HA dashboard if there is someone in the room, and it is idle/off the rest of the time. With the current options the screen is displaying the same dashboard 16h a day or whatever you setup on the settings, which I guess it might damage the screen

b0mbays commented 1 month ago

@b0mbays do you have any update about this? I would like to mimic what google does so the screen only displays the HA dashboard if there is someone in the room, and it is idle/off the rest of the time. With the current options the screen is displaying the same dashboard 16h a day or whatever you setup on the settings, which I guess it might damage the screen

Unfortunately I haven't attempted this yet. However I haven't had any damage to any of my 5 Google Hubs and they've been continuously casting 18 hours a day for almost 2 years so I wouldn't worry about it too much 👍

heisenberg2980 commented 1 month ago

@b0mbays thanks for the quick reply, it seems the burn-in issue affects more the v1 of the hub, so people with v2 should have less issues (though I expect the burn-in happening at some point, depending on how static the dashboard is): https://www.androidheadlines.com/2021/04/google-nest-hub-screen-burn-in.html

But the problem is not only damaging the screen, but also the energy wasted having a screen turned on when 99% of the time is not needed, specially considering the google hub comes with a motion sensor to turn off the screen automatically after certain time (obviously HA won´t have access to that sensor, but it wouldn´t matter as long as it stops casting as the hub would take care of dimming the screen).

If you can have a look and at least let us know how easy/difficult would be to implement a switch or some option to enable/disable the casting (similar to the option to change the dashboard depending on an entity), that would be really appreciated. I would love to help with a PR, but unfortunately my knowledge is pretty limited here.

iamer commented 1 month ago

Just in case you didn't notice my suggestion to look at wallpanel from HACS as a screesaver, it also has the ability to blank the screen with the black_screen_after_time option.

b0mbays commented 1 month ago

I've published a new release that adds a new feature to control the casting based on an entities state. Hopefully this works well for everyone's use case 😄

Apologies for the delay in getting this completed. I thought it was easy enough last week but it was slightly more complicated that I'd have hoped!

heisenberg2980 commented 1 month ago

That´s amazing!! Thank you very much @b0mbays, will test it straight away as soon as it´s available in HA :smiley:

b0mbays commented 1 month ago

No problem @heisenberg2980 - it should be there now if you do a restart 👍