Is it possible to combine the two into one? Currently I have two different dashboard buttons ‘on’ and ‘off’ I’d just like to combine somehow and just have one dashboard button.
OR perhaps change my button card instead…
- <<: *cb_standard_button_narrow
name: TV on
icon: mdi:television-classic
tap_action:
action: call-service
service: script.turn_on_tv
and
- <<: *cb_standard_button_narrow
name: TV off
icon: mdi:television-classic
tap_action:
action: call-service
service: script.turn_off_tv
Here’s my template switch only it’s telling me that failed to call service switch/tv Service not found… or am I looking for the wrong thing here? switch.tv
Invalid config for [switch.template]: [tap_action] is an invalid option for [switch.template]. Check: switch.template->switches->tv->tap_action. (See ?, line ?).
Sorry thought you were referring to the alignment since the red line was there…
That’s okay… I’ll work on it.
Thank you for the input. The time I have to work on HA is this time of the day generally before work. I give it about 3 hours a day… and now it’s time for work Wish I had unlimited hours to do work on this… but… I’ve grown accustomed to food and shelter so off to work I go. Have a great day.
You aren’t in the other thread where he’s talking about the documentation being outdated. I’m trying to get him to read the documentation and understand it. So he understands that the documentation is not outdated, he just doesn’t understand it (Not his fault).
Well, both of us know that there is a lot of work ahead to update the documentation. HA get filled with lot of new stuff every month and lots of Breaking Changes also. Developers aren’t the best to write documentation as they fall in the typical mistake believing others are as skilled as they are.
In General, most documentation should be written having in mind “everybody are a beginner”.
I know him quite well and I know the lack of updates to documentation has frustrated him (and also me earlier). In this case, he mixed scripts and the switch template in the stress of not getting things to work - this has at some point happen to us all, right? Sometimes the mistake are right in front of your eyes but you don’t catch it. Telling someone to “read the documentation” doesn’t necessarily make people learn, assisting with the code does.
This is how you’ve helped me earlier
Thanks for all help provided throughout the years @petro you are a very skilled person
The point I was trying to make was to at least attempt to start learning the documentation, which is why I didn’t give him the answer outright. I’ve helped him many times in the past with outright answers. At some point he should attempt to learn the docs. I simply chose this as a starting point. You have to start somewhere.
Doing what I can… I do read it and try it then I post the example and things like ‘use this not this’…
That’s where the documentation and my ‘it’s outdated’ comes from…
An example of that would be [not exact] but I’ll use something like ‘data:’ from the example and post my results then someone will say use ‘data_template’ now… this is what I’ve been running into… so it doesn’t match what the docs say… yes it may be minor to someone who knows… but to someone who doesn’t it’s an issue and I’m grateful to the person that pointed out my mistake without making me feel like an idiot.
I am grateful for the help from @stigh and everyone else that takes a minute to clarify things and/or help. I’ve had people show me how to make automations smaller… I learned JS and PHP on my own and yaml will take me a while because it’s just not coming to me for some reason… but then I do have a lot going on outside of this…
So again if I appreciate the help and trust me if I’m asking it’s because I’m trying to do this…
And that person who told you to use data_template is wrong. data is what you should be using data_template is outdated. If you see that in the docs, suggest an edit to the page to change it from data_template to data.
It’s just an example… made up of course… I was actually looking for the post where someone pointed something out to me … but didn’t find it. I have one foot out the door as I am late.