Comments (1)
I figured out how to implement what I wanted. I have created a sensor that shows the day of the week and the sunset or sunrise.
# Сенсор дня недели
sensor:
- platform: template
sensors:
dayoftheweek:
value_template: "{{ ['Monday','Tuesday','Wednesday', 'Thursday','Friday', 'Saturday', 'Sunday'][now().weekday()] }}"
entity_id: sensor.time
icon_template: mdi:calendar-month
# Day of the week and sun sensor
- platform: template
sensors:
day_week_and_sun:
friendly_name: "Day of the week and sun sensor"
value_template: >
{% set sunrise = is_state('sun.sun','above_horizon') %}
{% set sunset = is_state('sun.sun','below_horizon') %}
{% if sunrise %}
{{ states.sensor.dayoftheweek.state }}. Sunrise
{% elif sunset %}
{{ states.sensor.dayoftheweek.state }}. Sunset
{% endif %}
icon_template: >-
{% if is_state('sun.sun','above_horizon') %}
mdi:sunrise
{% elif is_state('sun.sun','below_horizon') %}
mdi:sunset
{% endif %}
And I made a wallpaper change not only by the days of the week, but also by sunset and sunrise
animated_background:
default_url: /local/animated-background/day/01.mp4
included_users:
- users
entity: sensor.day_week_and_sun
state_url:
Monday. Sunrise:
- /local/animated-background/day/Switzerland_01.mp4
- /local/animated-background/day/Switzerland_02.mp4
Monday. Sunset:
- /local/animated-background/night/Moon and lake.mp4
- /local/animated-background/night/Mountain and lake.mp4
Tuesday. Sunrise:
- /local/animated-background/day/Switzerland_03.mp4
- /local/animated-background/day/Switzerland_04.mp4
Tuesday. Sunset:
- /local/animated-background/night/03.mp4
- /local/animated-background/night/04.mp4
Wednesday. Sunrise:
- /local/animated-background/day/Iceland_01.mp4
- /local/animated-background/day/Iceland_02.mp4
Wednesday. Sunset:
- /local/animated-background/night/Space_01.mp4
- /local/animated-background/night/Space_02.mp4
Thursday. Sunrise:
- /local/animated-background/day/Iceland_03.mp4
- /local/animated-background/day/Iceland_04.mp4
Thursday. Sunset:
- /local/animated-background/night/Space_03.mp4
- /local/animated-background/night/Space_04.mp4
Friday. Sunrise:
- /local/animated-background/day/Iceland_05.mp4
- /local/animated-background/day/Iceland_06.mp4
Friday. Sunset:
- /local/animated-background/night/Space_05.mp4
- /local/animated-background/night/Space_06.mp4
Saturday. Sunrise:
- /local/animated-background/day/Switzerland_05.mp4
- /local/animated-background/day/Switzerland_06.mp4
Saturday. Sunset:
- /local/animated-background/night/Space_07.mp4
- /local/animated-background/night/Space_08.mp4
Sunday. Sunrise:
- /local/animated-background/day/Switzerland_07.mp4
- /local/animated-background/day/Switzerland_08.mp4
Sunday. Sunset:
- /local/animated-background/night/Space_03.mp4
- /local/animated-background/night/Space_02.mp4
from lovelace-animated-background.
Related Issues (20)
- Bug report: Configuration options overriding each other HOT 1
- display_user_agent: true does not do anything HOT 1
- Read animations from folders HOT 2
- Weather: day and night
- rpi 3b+ video stutter
- Bug report HOT 1
- No longer lets tablet display timeout HOT 1
- Clarify HACS install procedures please. HOT 2
- Resolution change?! HOT 4
- [Feature Request] Allow configuring opacity of the background HOT 2
- Simple question- help
- Lil suggestion I use for my theme. Transparent Sidebar HOT 1
- Local stored animated backgrounds?? HOT 2
- Dashboard nest hub
- Add variable video playback speeds
- Play next video in array after current one finishes
- WARNING: 2023.4.0b0 or newer break Animated Background HOT 42
- problem in new versions of HA HOT 9
- snow wallpaper animation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lovelace-animated-background.