Coder Social home page Coder Social logo

amitfin / lovelace-daily-schedule-card Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 1.0 1.45 MB

Home Assistant Custom Card for Daily Schedule Integration

License: MIT License

JavaScript 100.00%
custom-cards hacs home-assistant lovelace lovelace-custom-card

lovelace-daily-schedule-card's Introduction

Daily Schedule Card

HACS Badge

GitHub Release

Project Maintenance

Dedicated UI for Daily Schedule Integration entities with an optimized view and simplified editing capabilities.

Note: The custom integration is a prerequisite and can be installed via HACS using this link.

Configuration

General

Name Type Required Default Description
type string True - Must be custom:daily-schedule-card
title string False - Title of the card
card bool False True if title is supplied Whether to render an entire card or rows inside the entities card
template string False Null Template for rendering the value. Has access to entity_id

Entities

Name Type Required Default Description
entity string True - The binary_sensor entity ID
name string False Friendly name of the entity Name to display
template string False Null Per-entity template (overrides card's template)

Note: you can also just give the entity ID (with no entity:) if you don't need to specify the name explicitly.

Entities Card Example

type: entities
entities:
  - type: custom:daily-schedule-card
    entities:
      - entity: binary_sensor.venta_schedule
        name: Venta

Entire Card Example

type: custom:daily-schedule-card
title: Timers
entities:
  - binary_sensor.swimming_pool_filter_schedule

Template Example

type: custom:daily-schedule-card
card: true
template: >-
  {{ state_attr(entity_id, 'schedule') | rejectattr('disabled',
  'true') | map(attribute='from') | map('truncate', 2, True, '')
  | join(' | ') }}
entities:
  - binary_sensor.let_the_dog_out

Install

If you use HACS, the custom card will automatically be registered as needed.

If you don't use HACS, you can download js file from latest releases. Follow these instructions to register the custom card.

Usage

demo

demo.mov

lovelace-daily-schedule-card's People

Contributors

amitfin avatar dependabot[bot] avatar igorsantos07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

igorsantos07

lovelace-daily-schedule-card's Issues

Create an entity-row as well

This card is very handy, indeed! However, it would be even greater if it was possible to integrate it in an Entities card, thus having these functions on an entity-row instead of a fully fledged card :)

Option for disable any time frame

Hi,
Thanks for the card, is working great and is a nice help to manage timers.

Would be nice to have the option in settings to disable any of the saved time frames without deleting it.

Sometimes I need to change the irrigation (as sample) in spring/summer/autumn or any illumination and would like to use the same timer for all seasons.

What do you think?
(BTW: why the seconds are not available in settings? Any missed option from my side?)

Thanks!

Ways to simplify interface with many time slots?

This is more of a brainstorm than anything else, since I'm not sure exactly the best approach here...

The thing is: I use the daily schedule to configure moments to feed my cats, with 2 hours of interval. The time the sensor is on is irrelevant, I just need it to toggle so the automation fires, and thus I have all those periods with 1min between them. However, having 9 different times makes the use in the interface very bulky.

I created a template that simplifies this listing (compare them below), but then, I cannot use it in conjunction with this card - which is awesome for editing the schedule, without having to go deep into the HA settings.

image

Some ideas I had so far:

  • allow a custom template for rendering each time block
  • allow a custom content/template for the whole data
  • add different settings to display the time blocks (e.g. hide end time, show only hours, or potentially both options)
  • allow the edit popup to have its own URL, so we can create a button that navigates to it

Bonus: not sure if 12/24H has any affect on how the times are displayed, but I guess it should? I'm fine with 24h, though haha


btw, don't you have any ko-fi or the likes? I now realise how you simplified a LOT my feeding routing and I wanted to pay you a beverage (hopefully with no cat hair LOL), at least :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.