Hi all, new to HA and currently migrating from Hubitat. Loving HA so far but obviously still figuring stuff out.
I’d like to use the built-in GUI capabilities as much as possible without having to dive into scripting so was wondering if the following is possible without having to script?
The situation:
I have a zigbee dry contact relay that has an automation attached that turns the switch on and then back off to activate the garage opening or closing.
I have a button in my dashboard based on a helper that triggers the automation
The problem:
When I allow the state for the button to be displayed it always show the button as ‘off’
The question:
Is there a built in way in HA to show the state change and ideally also change the icon or the icon colour to show me whether the garage door is open or closed?
A button is a button, not a switch. It is “pressed” momentarily, but not on or off.
If you want to only view the state of the door, you can create a template binary sensor. This will TELL you whether the door is open or closed but cannot be used to trigger it. If you want a helper than gives you the current state and allows you to change it, you want to use an input_boolean (Toggle in the UI) helper.
You may need to modify your automation to use the new helper. Input booleans have two states (obviously) but you could trigger the automation on ANY state change depending on how you want it to work.
Please share some of your current configuration of your automations and any helpers if you would like specific help with that.
Sorry Sam, I misstated my helper in my initial post. I did indeed create a toggle as a helper to begin with not a button.
But I did use the button card on the dashboard to activate the helper.
I’m assuming there is no card that is a switch template that would mimic the helper toggle?
What is the code in your button card? Am I understanding correctly that you want the helper to turn on or off when you click the card?
I created a quick test button card here that is attached to an input_boolean (Toggle) helper. The action: toggle toggles between states on the input_boolean when the card is pressed. This works as expected
That explains it! So when you click the button, you are triggering the automation but not changing the state of the helper, you are only using the helpers state (which is always off, as the button doesn’t change it) to set the state of the button card.
Change your button card config so it matches my post above, or better, delete the card (if possible) and re-add it with JUST the toggle helper. You want the card to only change the state of the helper.
THEN go to your garage_door_relay_on_off automation and change the trigger so that it triggers on the state change of input_boolean.virtual_garage_door_helper.
After that, the card will display the state of the helper which in turn, triggers the automation. If you need help with the automation, please send the YAML config for that over as well.
Thx Sam, that did the trick! Really appreciate you helping a noob out.
Just need to get the hang of how HA handles things and I’ll be on my way in no time thx to guys like yourself!!
Would prefer for it to look like my original button (left hand side of the pic) though, but guess that’s me not being used to how the HA dash works
Instead of getting the button card to trigger the automation, we are getting it to run the service input_boolean.toggle on entity input_boolean.virtual_garage_door_helper.
EDIT: down the line, once you’ve gotten to grips with how HA operates a little more, you might want to consider adding a better way to detect whether the door is open or closed. Presumably right now, HA only knows the state of the door based on the toggle, meaning if the door is opened manually (outside of HA), HA won’t be notified of the change and the toggle will desync with the actual state of the door. But if you’re happy with how it is right now then don’t worry until you’re more confident!
YAML is the primary method of sharing configs on the forum thanks to copy/paste. It’s definitely worth getting to grips with how changing UI elements changes the YAML and you might find down the line you’re limited in what you can do without diving into YAML but for the most part you can choose to avoid it!
Thx @jerrm, I’ll give that a try as well.
I reckon Sam is right in that I just need to come to grips with YAML as it looks like it opens up a lot more opportunities.
Excited to play around with this as one area lacking in Hubitat was the dash in my opinion.
Just need to get something rudimentary going as fast as possible at the moment as I transition my devices so that the Mrs doesn’t start complaining about having to use 2 different systems
I’ve focused on the devices she uses most for starters and am building a basic dash just for her so she feels less impacted
Home Assistant is brilliant for getting everything to work through one app/voice assistant. Between custom integrations and add-ons and ESP Home, you can basically automate pretty much everything in your house in one way or another, make a nice dashboard and get the GF to adopt it. Mine is quite happy with using the app and smart speakers for the lights, adaptive lighting, fans, etc etc. She doesn’t care for all of it but that’s where the conditional card comes into play so it only shows on your dashboard!
If you are trying to get the Significant Other Approval Factor, I would strongly suggest later trying to foolproof the door sensor and modify your automation logic so the toggle remains synced with the actual state of the door no matter how/where/when it was opened/closed. You might use a door contact sensor for this purpose, for instance. Good luck!
I’ve seen ESP Home listed but not even sure what that does yet
I had assumed that it had something to do with an ESP soc, but I’ve only got 2 WLED devices running on an ESP32 so I never looked into it.
From what you’re describing it could be something different altogether. I’ll need to look into that then as well.
I’d wondered what conditional cards were for so great to know there’s that option rather than having to have completely different his/her dashboards. My initial thought had been to just manage which dashboards the Mrs had visibility on and which she would get excluded from just to keep it nice and simple for her, but maybe conditional cards are a better way to go.
Yeah I bought sensors for the garage door way back when I got the Hubitat but never got around to fitting them as it’s a bit tricky to install them somewhere easily.
But I agree that that’s the better way. Sending a command and merely relying on the fact that it was sent to determine whether something is open or closed is not foolproof.
Getting off topic here but you’re pretty much spot on, ESP Home allows you to integrate ESP32/EP8266 devices into HA. If you can connect it and the device has GPIO, you can do basically anything with relays, LEDs, etc etc. The possibilities are endless once you start hacking your own devices and fiddling with things.
The conditional cards are really useful. You can put them anywhere in your dashboard YAML and only show cards to one user. She doesn’t care about my uptime graphs or my work time tracker or anything so I only show them to me. She just gets lights etc. This is new functionality to the card but it seems to work really well for me.
The community will always be here if you need help with it, best of luck.
Thx, i’m really loving it so far. It seems like this is an infinte universe of possibilities compared to HE especially given the ease i’m finding of slipping into this new glove so I think the main thing will be to not get lost in the possibilites.
It’s also a lot more responsive in terms of loading all the cards and devices which in fairness has more to do with the fact i’m running this on a N100, but still a much appreciated improvement.