-
Notifications
You must be signed in to change notification settings - Fork 0
/
card.yaml
15 lines (15 loc) · 904 Bytes
/
card.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
type: vertical-stack
cards:
- type: entities
entities:
- entity: input_number.slider_cheapest_hours_block
name: Tijdblok goedkoopste uren
- type: markdown
content: >-
{% set days = ["Maandag", "Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zondag"] %}
{% from "cheapest_energy_hours.jinja" import cheapest_energy_hours %}
{% set time = cheapest_energy_hours("sensor.nordpool", hours=states('input_number.slider_cheapest_hours_block'), look_ahead=true, include_tomorrow=true) | as_datetime %}
<font color="greenyellow"><b><center>
Goedkoopste {{states('input_number.slider_cheapest_hours_block') | int}} uur:
{{ days[time.weekday()] }} {{ cheapest_energy_hours("sensor.nordpool", hours=states('input_number.slider_cheapest_hours_block'), look_ahead=true, include_tomorrow=true, time_format="%H:%M:%S") }}
</center></b></font>