Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Alternating entities in the screensaver #790

Open
soyxan opened this issue Mar 2, 2023 · 8 comments
Open

[Feature Request] Alternating entities in the screensaver #790

soyxan opened this issue Mar 2, 2023 · 8 comments
Labels
enhancement New feature or request homeassistant

Comments

@soyxan
Copy link

soyxan commented Mar 2, 2023

FEATURE DESCRIPTION

Implement in the screensaver the option to alternate between 2 entities in the same position (for instance temperature and humidity). This alternating could be defined with a time parameter which could establish how long each entity is shown in a loop.

ADDITIONAL CONTEXT

This is already implemented in ioBorker as per the following post:
#739 (comment)

PANEL / FIRMWARE VERION

EU

@Armilar Armilar added enhancement New feature or request homeassistant labels Mar 7, 2023
@afarago
Copy link
Contributor

afarago commented Dec 1, 2023

Hey @Armilar - could you share details on the ioBroker implementation / configuration?
I cannot seem to find it documented / in the code - would be eager to implement after I check the existing implementation / best practice.

@joBr99
Copy link
Owner

joBr99 commented Dec 1, 2023

It's just sending the update for the screensaver alternating with different entities.

I've started to reimplement the backend without appdaemon.
Didn't implement communication though Homeassistent events so far. But besides that it's pretty far.

#1058

@Armilar
Copy link
Collaborator

Armilar commented Dec 1, 2023

Hey @Armilar - could you share details on the ioBroker implementation / configuration? I cannot seem to find it documented / in the code - would be eager to implement after I check the existing implementation / best practice.

Actually everything happens in the HandleScreensaverUpdate() function.

The bottomScreensaverEntity already changes cyclically via the data point 0_userdata.0.NSPanel.1.ScreensaverInfo.entityChangeTime.

The question that now arises is which values should also change cyclically?

The only icons I can think of now are the leftScreensaverEntity in the advanced screensaver or the humidity in the alternative screensaver or the temperature (const weatherEntityPath: string = 'alias.0.Weather';) in the standard screensaver.

For all other values, another change wouldn't really make sense

The screensaver documentation is analogous to HA:
https://github.com/joBr99/nspanel-lovelace-ui/tree/main/HMI

If you implement it, please note that all screensaver types (standard, alternative and advanced) must continue to work.

@Armilar
Copy link
Collaborator

Armilar commented Dec 1, 2023

@joBr99

I've started to reimplement the backend without appdaemon

I saw that in the many thousands of commits ;-) ... AppDaemon seems to be very sluggish

Just to understand this correctly. Nothing will change for ioBroker, right?

@afarago
Copy link
Contributor

afarago commented Dec 1, 2023

Oh, I understand now, awesome idea!

Perhaps for AppDaemon/Homeassistant I would prefer a totally open format instead of hardcoding the entites as such.

I would be happy to implement it for my panel and for the community.
@joBr99 let me know your preference.
Actually the format below would allow any number of sets to be cycled without any backward-incompatible change.

  • current behavior: up to 10 (1+3+6) entities
  • alternating bottom rows behavior: above 10 (1+3+6) entities --> 11-16 - 2 sets cycling, 17-22 - 3 sets cycling etc...
    (* later - would also consider alternating the statusicon, but have no idea for the right format now)
nspanel-1:
  module: nspanel-lovelace-ui
  class: NsPanelLovelaceUIManager
  config:
    screensaver:
      entities:
        - entity: head
        - entity: left_3_rows
        - entity: left_3_rows
        - entity: left_3_rows
        - entity: bottom_6_cols
        - entity: bottom_6_cols
        - entity: bottom_6_cols
        - entity: bottom_6_cols
        - entity: bottom_6_cols
        - entity: bottom_6_cols
        - entity: bottom_6_cols_alternative
        - entity: bottom_6_cols_alternative
        - entity: bottom_6_cols_alternative
        - entity: bottom_6_cols_alternative
        - entity: bottom_6_cols_alternative
        - entity: bottom_6_cols_alternative

@joBr99
Copy link
Owner

joBr99 commented Dec 1, 2023

I think the least confusing way to implement this would be something like this:

    screensaver:
      entities:
        - entity: head
        - entity: left_3_rows
        - entity: left_3_rows
        - entity: left_3_rows
        - entity: bottom_6_cols
        - entity: bottom_6_cols
        - entity: bottom_6_cols
        - entity: bottom_6_cols
        - entity: bottom_6_cols
        - entity: bottom_6_cols
      entitiesAlt:
        - entity: head
        - entity: left_3_rows
        - entity: left_3_rows
        - entity: left_3_rows
        - entity: bottom_6_cols
        - entity: bottom_6_cols
        - entity: bottom_6_cols
        - entity: bottom_6_cols
        - entity: bottom_6_cols
        - entity: bottom_6_cols

@afarago do you have discord?, at the current state of the alternative addon without appdaemon, it's probably better to directly implement this in the new backend - next release will be without appdaemon

@joBr99
Copy link
Owner

joBr99 commented Dec 1, 2023

@Armilar So far my main prio is to create a drop in replacement for the appdaemon app, so no breaking changes for now

@afarago
Copy link
Contributor

afarago commented Dec 1, 2023

Apologies - please let me know if there is a discord server / chat.
You will find my discord id in my bio as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request homeassistant
Projects
None yet
Development

No branches or pull requests

4 participants