GithubHelp home page GithubHelp logo

Comments (16)

Villhellm avatar Villhellm commented on September 27, 2024 1

I'm working on the changes right now, so don't worry about it. They should be up within 20 minutes. But I'd appreciate if you would proofread for me again!

from lovelace-animated-background.

Villhellm avatar Villhellm commented on September 27, 2024 1

I was tired of people assuming that when dark sky gets removed it will break this plugin. And tired of people asking if they need dark sky for this to work.

I've just been using the default weather integration. It's definitely not as nice as dark sky and it only gives a 2 day forecast, but it at least gives you the current weather, which is all this plugin really needs to function as intended.

from lovelace-animated-background.

SeLLeRoNe avatar SeLLeRoNe commented on September 27, 2024

I just realised that I used the bug report instead of the FR template, sorry!

from lovelace-animated-background.

Villhellm avatar Villhellm commented on September 27, 2024

Sorry, using an entity state is the way to test backgrounds. Cycling wouldn't really be possible because the array is only meant to function as a pool for random selection.

Here's an input select configuration and an animated background group to help

Input Select

input_select:
  background_test:
    name: Background Test
    options:
      - Background 1
      - Background 2
      - Background 3
      - Background 4
      - Background 5
      - Background 6
      - Background 7
      - Background 8
      - Background 9

Animated Background group

- name: background_test
  config:
    entity: input_select.background_test
    state_url:
      'Background 1' - "local/animated_backgrounds/test/Androm_Spin.mp4"
      'Background 2' - "local/animated_backgrounds/test/biostorm.mp4",
      'Background 3' - "local/animated_backgrounds/test/biostorm2.mp4"
      'Background 4' - "local/animated_backgrounds/test/Bubbles_Animation.mp4"
      'Background 5' - "local/animated_backgrounds/test/light_burst_animation.mp4"
      'Background 6' - "local/animated_backgrounds/test/scifi-spin-v4.mp4"
      'Background 7' - "local/animated_backgrounds/test/scifitunnel03.mp4"
      'Background 8' - "local/animated_backgrounds/test/scifitunnel03.mp4"
      'Background 9' - "local/animated_backgrounds/test/spin_cycle.mp4"

Admittedly I haven't tested these configs, but they should be valid.

PS make sure you don't try to use commas after each entry, the yaml parser will have a fit 😉 and no worries about the issue template, I understood what you were asking for.

from lovelace-animated-background.

SeLLeRoNe avatar SeLLeRoNe commented on September 27, 2024

Yep I noticed the comma on my config and I did fix that, didn't realize I did also copy them here, fixed the original message.

Thanks for the idea to test them, but what if I want them to cycle randomly without being directly related to an entity?

Not sure I understand why the same logic wouldn't be applicable to the default_url to be honest :)

from lovelace-animated-background.

Villhellm avatar Villhellm commented on September 27, 2024

If you want to get a new random background from the default_background array then you'd need to refresh the page, or switch to a view that has a different animated config and then go back. The previously used backgrounds that are selected from a random number are not stored anywhere. And what would be the trigger to cycle? There is no user input outside of an entity state change that can change the background

from lovelace-animated-background.

SeLLeRoNe avatar SeLLeRoNe commented on September 27, 2024

Sorry maybe I didn't explain myself properly.

Allow me to try again :D
When for example you use the weather entity you can match the state, and for each state you can use different mp4 which are gonna be loaded randomly for if the state is matched.
ex:

        'sunny':
          - "/local/animated_backgrounds/weather/hlhff0h8md4ev0kju5be.hd.mp4"
          - "/local/animated_backgrounds/weather/zjqsoc6ecqhntpl5vacs.hd.mp4"
          - "/local/animated_backgrounds/weather/jvw1avupguhfbo11betq.hd.mp4"
          - "/local/animated_backgrounds/weather/8cmeusxf3pkanai43djs.hd.mp4"
          - "/local/animated_backgrounds/weather/guwb10mfddctfvwioaex.hd.mp4"

What I was thinking is that it would be nice to have this option also for default_url, so that if you have no match configured (or matched) it will failback on the default_url one, but still randomly loading one of the available for the default_url

In this case, you can have an animated random background which is not stricly dependant on an entity state but it simply load a random one from a list defined in default_url

Was this clearer? I hope yes :)

from lovelace-animated-background.

Villhellm avatar Villhellm commented on September 27, 2024

Oh that should be possible do that already, are you having an issue when you define default_url as an array?

from lovelace-animated-background.

SeLLeRoNe avatar SeLLeRoNe commented on September 27, 2024

Ah! No I haven't tried because in the docs it says "string", not "list" ^^
I'll try right now!

from lovelace-animated-background.

Villhellm avatar Villhellm commented on September 27, 2024

Oops, yeah that was my other mission today, go through the docs to make sure everything is updated to the new standards 😝

from lovelace-animated-background.

Villhellm avatar Villhellm commented on September 27, 2024

I'm also working on defaulting to lovelace theme if there is an error finding a proper state/default url. Right now I think it would just go white if something was missing.

from lovelace-animated-background.

SeLLeRoNe avatar SeLLeRoNe commented on September 27, 2024

No worries at all, You actually gave me also a great way to select the background from a dropdown which can be very handy :)

After I test this I will make make the PR to update the docs for that matter also with an example

from lovelace-animated-background.

SeLLeRoNe avatar SeLLeRoNe commented on September 27, 2024

Confirmed that is working :)

I'll check the docs now :)

from lovelace-animated-background.

Villhellm avatar Villhellm commented on September 27, 2024

Okay I just updated the docs. And I removed dark sky from the examples :(

from lovelace-animated-background.

SeLLeRoNe avatar SeLLeRoNe commented on September 27, 2024

It seems all good to me.

Why removed dark_sky? beside that everyone (included me) will have to get rid of it (do you have a nice alternative?) :)

from lovelace-animated-background.

SeLLeRoNe avatar SeLLeRoNe commented on September 27, 2024

I see, thanks! :)

from lovelace-animated-background.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.