foxy82
(foxy82)
July 4, 2022, 1:55pm
1
I want to create some buttons to turn the aircon off in 30mins, 1 hour, 2 hours. Something like below:
Ideally with the button remaining “pressed” when that timer is running.
I need to do this for 5 air con units so ideally I want to make it reusable rather than just creating 15 input booleans.
Any ideas on a clever way to do this?
tome88
(Tom)
January 31, 2023, 8:20am
2
would love to also know how to do this! did you get anywhere with this?
Hi,
Did you do it? and can you tell us how?
vlad2005
(Vladone)
October 20, 2023, 9:20am
4
create a script to start and then stop a device with a delay between the two actions
edit a dashboard to which you add the previously created script entity and for the type of card choose button
To arrange several buttons vertically/horizontally, you have the option of adding a virtual stack or horizontal stack card to the dashboard
foxy82
(foxy82)
October 21, 2023, 3:49pm
5
Whilst @vlad2005 answer is good I have multiple aircons and wanted multi options and I don’t like the increasing number of automations in my system. So I did this:
Use the helpers to create an input_select helper. Added “Disabled” as the first entry and then “30”, “60”, *90", etc as the minutes.
Then I created this automation:
alias: Turn off Bedroom Aircon Timer
description: ""
trigger:
- platform: state
entity_id:
- input_select.bedroom_aircon_off_time
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.bedroom_aircon_off_time
state: Disabled
sequence: []
default:
- delay: 00:{{ states('input_select.bedroom_aircon_off_time') | int }}:00
- service: climate.turn_off
entity_id: climate.bedroom_ac
- service: input_select.select_option
data:
option: Disabled
target:
entity_id: input_select.bedroom_aircon_off_time
mode: restart
1 Like