Likewise. I have plenty of time triggers and theyāve never missed a beat.
Neat custom integration though. Well done neliss.
Likewise. I have plenty of time triggers and theyāve never missed a beat.
Neat custom integration though. Well done neliss.
Many thanks for all feedback so far!
I made some progress with the custom_component, the timekeeping which was done in the Node.js app, is now a part of the custom_component.
The Node.js app was also responsible for storage of the entities (persistence), this is moved to the custom_component as well.
This means that the Node.js app is not longer required.
For the time being the custom_component still relies on retained messages on MQTT for ādiscoveringā the entities after restarting HA, but Iām looking into a proper way (such as generated YAML or database storage).
To be continued!
Iām having trouble configuring it, mind sharing a full config dump of your card?
Wow! Awesome progress! Looking forward for dropping MQTT as well! Keep up the great work! Once you do it - Iād vote for making this an official HA integration. This functionality is missing for so long, that they need to make it part of HA by default once
Iām having trouble configuring it, mind sharing a full config dump of your card?
Sure thing!
It was rather long for posting here, so i added it to the repo.
A barebones starting config would be:
type: custom:scheduler-card
groups: # groups define the options you can choose from when you make a new entity
all_lamps: # gives a group labeled 'all lamps' with all light entities under it
domains: [light]
my_filter: #gives a group labeled 'my filter' with only 1 entity under it
entities: [fan.my_filter]
# note that each entity or domain used in a group, needs to have at least
# 1 action defined for it (else it would become a stub - could cause crashes)
domains: # add here the settings you want to apply to each entity of a type
light: # all lights will have a 'turn on' and 'turn off' action
actions:
- service: turn_on
- service: turn_off
entities: # add here specific entities with their actions
fan.my_filter:
actions:
- service: turn_on
service_data: {speed: high}
- service: turn_off
You can prettify the visualization of the card by adding name:'my name'
or icon:my-mdi-icon
properties (you can do this per group, per entity, per domain and per action).
Currently the code is not very forgiving: if you make a typo, the whole card will not show up.
Also the groups/domains/entities
configurations are currently mandatory, meaning that you will have to put at least 1 item (so above example is also close to a minimum configuration).
I am aware that it it a bit cumbersome and confusing to configure the card. Keeping it user-friendly is one of the key goals, so you can expect improvements here.
Wow! Awesome progress! Looking forward for dropping MQTT as well! Keep up the great work! Once you do it - Iād vote for making this an official HA integration. This functionality is missing for so long, that they need to make it part of HA by default once
Thanks
I would like to drop the MQTT asap as well, but this was the best i could achieve for now. I asked for assistance on the Discord chat (thanks for the tip!), because I need to find out how to create entity persistence (without having to define them in YAML). So far no useful input, but weāll see.
So far no useful input, but weāll see.
Did you post it on devs_core
channel? Discord?
Basically if you create entities HA takes care of their storage automatically. I think what youāre looking for is State Attributes
.
Iāve seen in your code you already handle it. Then whenever you want to store something in there just call self.async_schedule_update_ha_state(True)
and you should be fine.
However if you want to store something (e.g. config data) because you want to keep that between HA restarts then Iām not sure whatās the best way, but I know a common solution is to output such things to a file. Google Calendar and Z_Wave integrations do it. See here: https://github.com/home-assistant/core/blob/d058802325598ab44e319f65525045295781e366/homeassistant/components/google/init.py#L392
The icons are offset for me:
Woah that looks bad!
Seems like the complete CSS config of the card is being ignored.
I must say i have seen something similar a few times, but it was gone after refreshing.
It is a bit of a cliche, but did you try (force) refreshing the browser?
I tried this card with the default HA theme, do you maybe use an alternative theme?
I force refreshed and itās working now!
Thanks for your work! It looks awesome and I have been looking for this functionality in HA for quite some time now.
I didnāt try it yet thoughā¦ I am waiting for it to be in a more stable phase and my coding skills are limited.
Any updates since the last comments? Should I give it a try already?
Thanks again
Well I still have a pending PR that adds some more stuff internally. I use it and itās great with me, but the card sometimes is buggy.
If it doesnāt work, hard-refresh the page.
Make sure you add content to it when you hit save, or itāll hide all of the cards in that view!
Thanks for your work! It looks awesome and I have been looking for this functionality in HA for quite some time now.
I didnāt try it yet thoughā¦ I am waiting for it to be in a more stable phase and my coding skills are limited.
Any updates since the last comments? Should I give it a try already?
Thanks again
Hi, great to hear you like to use my scheduler integration!
I can tell you that iām working on a new revision of the custom_component which will probably have quite some breaking changes, meaning that if you install it now, updating it can become a pain in the *ss. So perhaps better to wait a week or so.
The current custom_component is quite basic and uses MQTT topics to store the time schedules.
Over the past days I had some discussions with some of the developers behind HA.
They advised me to use use config entries instead and creating a true integration (which you can set up under āintegrationsā in HA).
It took quite some changes, but I have the basics locally running. The storage is now internal in HA as well and automatically restored upon restart.
The next step is to add some provisions such that a single schedule entity can contain multiple time+actions, such that combined on+off actions or even week programs will be possible.
From there on I will focus on improving the functionalities of the UI (scheduler-card).
I will post an update when things are ready, keep checking for updates
Phantastic progress! Looking forward to install the integration. I was about to turn away from Home Assistant due to the lack of a decent scheduler. Thanks for taking the efforts to work on such an important component!
BTW, in case you are interested in ideas for a nice UI maybe you want to have a look here: https://community.home-assistant.io/t/week-scheduler-including-really-nice-example-ui/205620
Hi, thanks for supporting this initiative!
An update will be coming to facilitate making bundled schedules (combined start/stop actions and start-stop times).
I am also considering to implement a bar view, such that you can make a weekly schedule.
I looked at your UI and it looks similar to what i have in mind, the biggest consideration is that it needs to be mobile-friendly, i.e. it should be practical on a small screen (maybe in landscape orientation).
The Tado Smart Thermostat has a editor UI that looks quite clear to me:
Update time!
You can now set up the scheduler as integration:
Working fine!
Mind adding a custom panel to the sidebar?
You can accomplish this on your own with the following steps.
Working great here, iām curious who will give it a try.
Integration works fine, my problem is loading the custom card.
I cloned the repo into www folder
resources:
- url: /local/scheduler-card/scheduler-card.js?v=0
type: module
I try to add card
I also tried extract the *.js
files into www/scheduler-card
same result, any thoughts?
Hi Mark,
i think the URL for the card should become:
/local/scheduler-card/dist/scheduler-card.js?v=0
Recently the /dist/
folder was added, i guess this is not up-to-date yet with the documentation, sorry about that!
Please be aware that the ā...
ā as configuration for the domains / entities / groups you shouldnāt take to literally, it would give a huge error if leave it like that
The idea is that you tell the card which entities and actions you would like to control with schedules.
For a starting point you could try this:
type: custom:scheduler-card
domains:
light:
icon: lightbulb
actions:
- service: turn_on
icon: lightbulb-outline
- service: turn_off
icon: lightbulb-off-outline
With this little code, all your lights should show up and you will be able to turn them on and off automatically.
Documentation for configuring the card is a BIG work-in-progress still, so (for the time being) please ask if you need some assistance with this.
Good luck!