In the quest for a perfect Alarm Clock, I'm getting closer, thanks to home assistant.
This card was designed for a tablet which I use on my nightstand with a resolution of 1280px on 800px. The idea is to have a really minimalistic, readable clock with some Home Assistant love.
The card exists out of two parts:
...
alarm_entities:
- entity_id: input_boolean.alarm_clock
- entity_id: media_player.gpm_desktop_player
...
...
scripts:
- entity: script.start_lights_bedroom_slowly
when: '-00:30'
- entity: light.bathroom
when: on_dismiss
service: light.turn_on # not necessary as default is homeassistant.turn_on
...
But wait, that's not all! It also integrates with:
This custom card can be tracked with the help of custom-lovelace.
In your configuration.yaml
custom_updater:
card_urls:
- https://raw.githubusercontent.com/rdehuyss/homeassistant-lovelace-alarm-clock-card/master/custom_updater.json
You should have installed the custom_component hass-variables
[home-assistant-root]/www/custom_ui/alarm-clock-card/
variable:
alarm_clock:
value: 'Alarm Clock'
restore: true
resources:
- url: https://unpkg.com/moment@2.22.2/min/moment.min.js
type: js
- url: https://cdn.jsdelivr.net/npm/flatpickr
type: js
- url: https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css
type: css
- url: /local/custom_ui/alarm-clock-card/alarm-clock-card.js?v=0.5.0
type: module
...
- title: Alarm Clock
panel: true
cards:
- type: vertical-stack
cards:
- type: "custom:alarm-clock-card"
alarm_entities:
- entity_id: input_boolean.alarm_clock
- entity_id: media_player.gpm_desktop_player
scripts:
- entity: script.start_lights_bedroom_slowly
when: '-00:30'
- entity: light.bathroom
when: on_dismiss
service: light.turn_on
holiday:
calendars:
- calendar.holidays
cards:
- type: 'custom:simple-weather-card'
entity: weather.yweather
- type: media-control
entity: media_player.gpm_desktop_player
- type: "custom:monster-card"
card:
title: Devices requiring your attention
type: entities
show_empty: false
filter:
include:
- state: "on"
- state: "playing"
exclude:
- domain: group
- domain: weather
- domain: calendar
- domain: input_boolean
- domain: binary_sensor
- entity_id: switch.licht_nachtkastje
when:
entity: group.all_important_devices
state: 'on'
- type: "custom:monster-card"
card:
title: Quick info
type: glance
filter:
include:
- entity_id: group.all_important_devices
options:
name: "All lights"
tap_action: toggle
- entity_id: switch.licht_nachtkastje
options:
name: "Licht nachtkastje"
tap_action: toggle
- entity_id: binary_sensor.alarm
- entity_id: binary_sensor.motion
- entity_id: binary_sensor.back_door
- entity_id: binary_sensor.front_door
- entity_id: sensor.temperature
- entity_id: sensor.humidity
- entity_id: sensor.illuminance
when:
entity: group.all_important_devices
state: 'off'
In my example, the configuration also uses Simple Weather Card