#custom card ideas and tutorial?
1 messages ยท Page 1 of 1 (latest)
right now i have this with "fusion", but i wanted something more cool with custom cards
I'd look into a sections dashboard, with mushroom and bubble cards just to name a few.
Hi, I'm new to HA and I'm trying to find tutorials to make my own cards/automations
Right now, I'm looking to create a weekly scheduler, for an on/off signal, by day.
nielsfaber' scheduler component seems to be by task, which is not what I need.
Any advice, link or help will be appreciated.
This is a basic template I have found (crestron). It represents my needs : first time is ON, second is OFF, each day of the week.
Generally, it is best to create your own thread when asking questions. But, this one isn't really being used anymore so here we are.
There might be an integration out there that can help set up what you want, but I didn't look and choose to describe how to set up everything manually.
First, you need a way to store the individual start/stop times. For that, you need a helper entity, specifically an input_datetime (set to Time only). You need one for the start time and another for the end time... but repeated for each day. (So that will be 14 helper entities.) If you want an easy way to enable/disable the automation, you would need a toggle (input_boolean) helper. (Again, for each day, so another 7 entities.) I'd recommend coming up with a standardized naming convention for these entities because it will make everything way easier later.
input_datetime.automation_scheduler_monday_start
input_datetime.automation_scheduler_monday_end
input_boolean.automation_scheduler_monday_enabled
For the card, I would use a custom:button-card. With this card, you can make it do almost anything with a little bit of work. This is what I came up with so far:
I still have a little bit more work to put into it; I don't have it smart enough to prevent the two times being equal or overlapping. Getting the +/- buttons took a bit more work than I care to admit. Unfortunately, I need to get to bed.
Thank you for your help @silver acorn
Do you know any tutorial that would help me to learn how to create custom card like this ?
I don't want to rely only on the community's kindness ๐
The design is a bit rough (+/- for time seems bad UX), I need to make something friendly for users. My biggest problem, RN, is that I don't know the possibilities of HA yet.
Regarding tutorials, there's really no definitive one place to reference. The way I learned was going through the documentation and there's a forum thread called something like Fun with custom:button-card (I'll get a link for you later). I'd go through thread looking at pictures and then reference their code to see how stuff was accomplished. (Basically like what I'm going to do with you. I'll share the code and then you modify it the way you want, thus learning.) With the docs, just experimenting to see how options work.
Regarding +/-, you're right. It is not the best option, but I'm making it work since it is based off the original screenshot you provided. With that said, that would be a good thing to practice to design your own, perhaps with up/down arrows for each of the hours and minutes. I'll probably make a v2 to do that myself.
Thank you again
I have found the scheduler card (https://github.com/nielsfaber/scheduler-card?tab=readme-ov-file), that can do what I want, in a way, spacially the time scheme editor.
I don't know if I can duplicate this card and customize it, then how. To something like I have designed.
The end user doesn't need to edit the task behind, I want to grant him only the schedule. Tasks and automation will be set up in editor mode.
By the way, this is to automate wake up and shutdown of cultural installation in museums (WOL, PJLink, UDP message). So the end user will be the guides (not technicians), they will set up their schedule maybe twice a year, or for special occasion (night at the museum for instance)
Just out of curiosity, why are you wanting to run Home Assistant instead of an industrial system like SCADA with HMIs? I'm sure it can be made to work but IMO, you're going to be putting more effort into HA.
Well, that's exactly what I think, but my boss is using it for private usage and he thought that it is a good solution. But, yesterday we had another discussion about it, about the amount of time I have to put into this for a not so convenient result (but free let's face it). While my time is not free... So I'm heading toward another solution ๐