All Projects → Kirbo → ha-lovelace-elapsed-time-card

Kirbo / ha-lovelace-elapsed-time-card

Licence: MIT license
Home Assistant Lovelace Custom Card to calculate time elapsed/left

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ha-lovelace-elapsed-time-card

slider-button-card
A button card with integrated slider
Stars: ✭ 319 (+1419.05%)
Mutual labels:  homeassistant, hacs, lovelace-custom-card
homeassistant-homeconnect
Custom component for Home Assistant to connect appliances supporting the Home Connect standard
Stars: ✭ 120 (+471.43%)
Mutual labels:  homeassistant, hacs
numberbox-card
Replace input_number sliders with plus and minus buttons
Stars: ✭ 61 (+190.48%)
Mutual labels:  hacs, lovelace-custom-card
homeassistant-aemet-sensor
AEMET integration for Home Assistant
Stars: ✭ 21 (+0%)
Mutual labels:  homeassistant, hacs
mega hacs
MegaD HomeAssistant integration
Stars: ✭ 87 (+314.29%)
Mutual labels:  homeassistant, hacs
ocpp
Home Assistant integration for electric vehicle chargers that support the Open Charge Point Protocol (OCPP).
Stars: ✭ 82 (+290.48%)
Mutual labels:  homeassistant, hacs
Home-Assistant-custom-components-DPC-Alert
Italy Meteo-hydro alert and hydrogeological phenomena Civil Protection (Protezione Civile). In this custom component you can find the vigilance Bulletin and the Bulletin of national hydrogeological and hydraulic criticalities. They allow to check whether in your current location there will be criticalities/warnings related to weather-hydrogeolog…
Stars: ✭ 31 (+47.62%)
Mutual labels:  homeassistant, hacs
MeteoalarmCard
Meteoalarm, Météo-France and DWD severe weather warnings card for Home Assistant Lovelace UI ⛈️
Stars: ✭ 48 (+128.57%)
Mutual labels:  homeassistant, hacs
panasonic smart app
Panasonic Smart App integration for Home Assistant.
Stars: ✭ 22 (+4.76%)
Mutual labels:  homeassistant, hacs
home assistant adax
Integration for Adax heaters
Stars: ✭ 24 (+14.29%)
Mutual labels:  homeassistant, hacs
ad-alexatalkingclock
Alexa (or other Smart Speakers) tell you the time without asking every hour. Please ⭐️if you like my app :)
Stars: ✭ 30 (+42.86%)
Mutual labels:  homeassistant, hacs
select-list-card
Select List Card displays an input_select entity as a list in lovelace
Stars: ✭ 51 (+142.86%)
Mutual labels:  homeassistant, lovelace-custom-card
ps-date-countdown
A python script for Homeassistant that counts down the days to birthdays, anniversaries etc
Stars: ✭ 21 (+0%)
Mutual labels:  homeassistant, hacs
lovelace-collapsable-cards
A custom Lovelace card that hides other cards behind a dropdown toggle
Stars: ✭ 83 (+295.24%)
Mutual labels:  homeassistant, lovelace-custom-card
plugwise-beta
Custom-component / development version of the Plugwise Home Assistant platform
Stars: ✭ 23 (+9.52%)
Mutual labels:  homeassistant, hacs
lovelace-valetudo-map-card
Draws the map available from a Xiaomi Vacuum cleaner flashed with Valetudo in a Home Assistant Lovelace card
Stars: ✭ 149 (+609.52%)
Mutual labels:  homeassistant, hacs
hass-hue-icons
Additional vector icons for home assistant to model Philips Hue bulbs and fixtures.
Stars: ✭ 161 (+666.67%)
Mutual labels:  homeassistant, hacs
atomic-calendar-revive
An advanced calendar card for Home Assistant Lovelace.
Stars: ✭ 218 (+938.1%)
Mutual labels:  homeassistant, hacs
power-distribution-card
A Lovelace Card for visualizing power distributions.
Stars: ✭ 117 (+457.14%)
Mutual labels:  homeassistant, hacs
purifier-card
Air Purifier card for Home Assistant Lovelace UI
Stars: ✭ 155 (+638.1%)
Mutual labels:  homeassistant, hacs

Time Elapsed Card by @kirbo

Time Elapsed card

GitHub Release License hacs_badge

Project Maintenance GitHub Activity

Discord Community Forum

Support

Hey dude! Help me out for a couple of 🍻 or a !

coffee

Options

Name Type Requirement Description Default
type string Required custom:elapsed-time-card
time_today string Required Home Assistant entity ID. none
max_today string Optional Home Assistant entity ID. none
format string Required Format for the card Time Left
time_format string Required Card name 1h 5m
name string Optional Name to show on card none
icon string Optional Icon to show on card none

Format Options

Time Elapsed

Show time in <time elapsed> / <time maximum> format, e.g.: 01:54 / 02:00 or 1h 54m / 2h, depending on time_format setting.

Time Left

Show time in <time remaining> format, e.g.: 00:06 or 6m, depending on time_format setting.

Examples

Card examples

Cartoons Watched

type: 'custom:elapsed-time-card'
format: Time Elapsed
time_format: 1h 5m
time_today: sensor.ps4_playing_game
max_today: input_datetime.ps4_game_time
name: Cartoons watched
icon: netflix

Game time left

type: 'custom:elapsed-time-card'
format: Time Left
time_format: 1h 5m
time_today: sensor.ps4_playing_game
max_today: input_datetime.ps4_game_time
name: Game time left
icon: sony-playstation

Editor examples

Game time left - Editor 1 Game time left - Editor 2

Panel example

Time Cards and history example

type: horizontal-stack
cards:
  - type: vertical-stack
    title: Today elapsed
    cards:
      - format: Time Elapsed
        time_format: 1h 5m
        type: 'custom:elapsed-time-card'
        name: Played total
        icon: gamepad-variant
        time_today: sensor.ps4_playing_game
      - format: Time Elapsed
        time_format: 1h 5m
        type: 'custom:elapsed-time-card'
        name: Watched total
        icon: youtube
        time_today: sensor.ps4_playing_app
      - format: Time Elapsed
        time_format: 1h 5m
        type: 'custom:elapsed-time-card'
        name: Screentime total
        icon: monitor-eye
        time_today: sensor.ps4_playing
  - type: vertical-stack
    title: Today left
    cards:
      - format: Time Left
        time_format: 1h 5m
        type: 'custom:elapsed-time-card'
        name: Game time left
        icon: gamepad-variant
        time_today: sensor.ps4_playing_game
        max_today: input_datetime.ps4_game_time
      - format: Time Left
        time_format: 1h 5m
        type: 'custom:elapsed-time-card'
        name: Videos left
        icon: youtube
        time_today: sensor.ps4_playing_app
        max_today: input_datetime.ps4_vod_time
      - format: Time Left
        time_format: 1h 5m
        type: 'custom:elapsed-time-card'
        name: Screentime left
        icon: monitor-eye
        time_today: sensor.ps4_playing
        max_today: sensor.ps4_playing
  - type: vertical-stack
    title: Today total
    cards:
      - format: Time Elapsed
        time_format: '01:05'
        type: 'custom:elapsed-time-card'
        name: Played total
        icon: gamepad-variant
        max_today: input_datetime.ps4_game_time
        time_today: sensor.ps4_playing_game
      - format: Time Elapsed
        time_format: '01:05'
        type: 'custom:elapsed-time-card'
        name: Watched total
        icon: youtube
        time_today: sensor.ps4_playing_app
        max_today: input_datetime.ps4_vod_time
      - format: Time Elapsed
        time_format: '01:05'
        type: 'custom:elapsed-time-card'
        name: Screentime total
        icon: monitor-eye
        time_today: sensor.ps4_playing
  - type: vertical-stack
    title: This week elapsed
    cards:
      - format: Time Elapsed
        time_format: 1h 5m
        type: 'custom:elapsed-time-card'
        name: Played total
        icon: gamepad-variant
        time_today: sensor.ps4_weekly_game
      - format: Time Elapsed
        time_format: 1h 5m
        type: 'custom:elapsed-time-card'
        name: Watched total
        icon: youtube
        time_today: sensor.ps4_weekly_app
      - format: Time Elapsed
        time_format: 1h 5m
        type: 'custom:elapsed-time-card'
        name: Screentime total
        icon: monitor-eye
        time_today: sensor.ps4_weekly_playing
  - type: vertical-stack
    title: This week elapsed
    cards:
      - format: Time Elapsed
        time_format: '01:05'
        type: 'custom:elapsed-time-card'
        name: Played total
        icon: gamepad-variant
        time_today: sensor.ps4_weekly_game
      - format: Time Elapsed
        time_format: '01:05'
        type: 'custom:elapsed-time-card'
        name: Watched total
        icon: youtube
        time_today: sensor.ps4_weekly_app
      - format: Time Elapsed
        time_format: '01:05'
        type: 'custom:elapsed-time-card'
        name: Screentime total
        icon: monitor-eye
        time_today: sensor.ps4_weekly_playing

Example sensors

PS4 restrictions and stuff

sensors

- platform: template
  sensors:
    ps4_media_content_type:
      friendly_name: "PS4 - Media content type"
      value_template: "{{ state_attr('media_player.ps4', 'media_content_type') }}"
      
- platform: history_stats
  name: PS4 Playing (game)
  entity_id: sensor.ps4_media_content_type
  state: "game"
  type: time
  start: "{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}"
  end: "{{ now() }}"

- platform: history_stats
  name: PS4 Playing (app)
  entity_id: sensor.ps4_media_content_type
  state: "app"
  type: time
  start: "{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}"
  end: "{{ now() }}"

input_datetime

ps4_game_time:
  name: PS4 - Game time
  icon: mdi:sony-playstation
  has_date: false
  has_time: true

ps4_app_time:
  name: PS4 - APP time
  icon: mdi:netflix
  has_date: false
  has_time: true

With the entities above, you can use this configuration:

format: Time Elapsed
time_format: '01:05'
type: 'custom:elapsed-time-card'
name: Played total
icon: gamepad-variant
max_today: input_datetime.ps4_game_time
time_today: sensor.ps4_playing_game

And it will look like: Cartoons Watched

Notice

The card will show only entities that:

  • have unit_of_measurement one of the following (i.e. input_number, etc.):
    • s = seconds
    • m = minutes
    • h = hours
    • d = days
  • have one of the following attributes (i.e. input_datetime):
    • has_time
    • has_date

My stats

Kirbo's GitHub stats

Top Langs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].