Skip to content

Instantly share code, notes, and snippets.

@holysoles
Last active January 15, 2025 02:10
Show Gist options
  • Select an option

  • Save holysoles/420c5156c63518df6a058edaecd67edc to your computer and use it in GitHub Desktop.

Select an option

Save holysoles/420c5156c63518df6a058edaecd67edc to your computer and use it in GitHub Desktop.
Home Assistant Native Digital Clock Cards
template:
- sensor:
- name: "hour"
state: "{{ now().timestamp() | timestamp_custom('%H') }}"
- sensor:
- name: "minute"
state: "{{ now().timestamp() | timestamp_custom('%M') }}"
elements:
- entity: sensor.hour
style:
color: '#17d3b7'
font-size: 600%
left: 50%
top: 50%
type: state-label
image: >-
data:image/svg+xml,%3Csvg%20width%3D%22300%22%20height%3D%22300%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%2F%3E
type: picture-elements
elements:
- entity: sensor.minute
style:
color: '#17d3b7'
font-size: 600%
left: 50%
top: 50%
type: state-label
image: >-
data:image/svg+xml,%3Csvg%20width%3D%22300%22%20height%3D%22300%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%2F%3E
type: picture-elements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment