CENTRAL HEATING TIMES SELECTION
(First of all a apology, this is the first time I have posted here, if I have got the formatting wrong then be gentle with me and help me get it right in future. I have inserted 3 ticks ``` around the code but can’t seem to get it acceptable).
I am emulating an old central heating programmer.
I have all the ON/OFF timers working, 3 periods (morning, midday/afternoon and evening/night) and control of the Hot Water and Radiators so that the radiator pump cannot be ON without the boiler being on. It’s all working well so much so that I have turned off the old programmer.
I’m now working on the selection of major times period without having to reprogram the timers every time. This all need a ‘ Dr Zzzs WAF ’ (if you know what I mean).
The issue is I have four buttons as below which I want to use as radio buttons so thy are all mutually exclusive of each other. Not being used to HA and YAML I am pleased with my progress so far but now need some pointers.
Only the [ Programmer ] and [ 24 hours ] buttons act as intended but the others don’t. I also want to make it so there is always one button ON, there must NEVER be all OFF. Help !
LOVELACE PANEL:
LOVELACE CARD
Here’s the image of the four buttons.
Nomenclature:
input_boolean.ch_radio_button_xxx
- ch = Central Heating
- prg = Programmer
- day = Day
- 24h = 24 hours (on continuously)
Shutdown = completely off.
Here’s the YAML, I have removed the STYLE settings for ease of reading.
HELPERS, one for each button (4)
- input_boolean.ch_radio_button_prg
- input_boolean.ch_radio_button_24h
- input_boolean.ch_radio_button_day
- input_boolean.ch_radio_button_shutdown
type: horizontal-stack
cards:
- type: button
tap_action:
action: toggle
icon: 'mdi:radiobox-marked'
name: Programmer (opposite)
show_state: false
show_icon: true
hold_action:
action: none
icon_height: 32px
entity: input_boolean.ch_radio_button_prg
- type: button
tap_action:
action: toggle
icon: 'mdi:radiobox-marked'
name: Day (1st ON to last OFF)
show_state: false
show_icon: true
hold_action:
action: none
icon_height: 32px
entity: input_boolean.ch_radio_button_day
- type: button
tap_action:
action: toggle
icon: 'mdi:radiobox-marked'
name: 24 Hours (continuous)
show_state: false
show_icon: true
hold_action:
action: none
icon_height: 32px
entity: input_boolean.ch_radio_button_24h
- type: button
tap_action:
action: toggle
icon: 'mdi:radiobox-marked'
name: OFF (completely)
show_state: false
show_icon: true
hold_action:
action: none
icon_height: 32px
entity: input_boolean.ch_radio_button_shutdown
SCRIPTS, one for each button (4)
I have executed each script from the /config/script/dashboard and they function as required.
alias: 'CH, Radio Prg Pressed'
sequence:
- service: input_boolean.turn_on
data: {}
entity_id: input_boolean.ch_radio_button_prg
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.ch_radio_button_day
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.ch_radio_button_24h
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.ch_radio_button_shutdown
mode: single
alias: 'CH, Radio Day Pressed'
sequence:
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.ch_radio_button_prg
- service: input_boolean.turn_on
data: {}
entity_id: input_boolean.ch_radio_button_day
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.ch_radio_button_24h
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.ch_radio_button_shutdown
mode: single
alias: 'CH, Radio 24h Pressed'
sequence:
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.ch_radio_button_prg
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.ch_radio_button_day
- service: input_boolean.turn_on
data: {}
entity_id: input_boolean.ch_radio_button_24h
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.ch_radio_button_shutdown
mode: single
alias: 'CH, Radio ShutDown Pressed'
sequence:
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.ch_radio_button_prg
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.ch_radio_button_day
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.ch_radio_button_24h
- service: input_boolean.turn_on
data: {}
entity_id: input_boolean.ch_radio_button_shutdown
mode: single
Thanks in anticipation everyone.