Sure!
I’ve removed any links to the LH menu and top alarms as that’s another story.
Note that since I last posted, I’ve changed the top section for both heating and water to reflect the fact I realised I never needed the “off” or “Scheduled” buttons as I lever had a need to leave “scheduled” so now looks like this:
I think I mentioned before that you cannot switch schedule 2 or 6 on/off or set their time - this is because they are the default ‘day’ and ‘night’ temps and so must always be ‘on’ and the timing is set by input_select.house_mode
. It’s easy enough to con age if you don’t want to do it this way, but just ask if you want help.
I’m using a bunch of decluttering templates (which uses custom: button) so you’ll need to install the following (HACS):
- custom:decluttering-card
- custom:button-card
- custom:text-divider-row
- custom:lovelace-expander-card
- custom:vertical-stack-in-card
- custom:lovelace-layout-card
- custom:numberbox-card
- custom-brand-icons
The code might look a little bonkers but info_button
is used all over my dash and a single change to it will change the look of all my dashboards.
The Hive ‘system’ assumes the following template sensors exist which I can provide if needed):"
input_select.house_mode
can be['Awake','Asleep','Manual']
zone.home
(most users have this)sensor.time
(most users have this)- contact sensors ending in
door_contact
,doors_contact
,window_contact
- check the package forbinary_sensor.hive_heating_doors/windows open
which uses these and has some ignored (eg: for me the front door and ensuite window).
Dashboard view
Heating/Water view
title: Hive heating
path: hive
icon: phu:hive
cards:
#-------------------------------------------------------------------------------
- type: vertical-stack
title: Hive Status
cards:
- type: custom:decluttering-card
template: climate-info
- type: custom:decluttering-card
template: climate-info-temperature
- type: horizontal-stack
cards:
- type: custom:decluttering-card
template: info_button
variables:
- entity: sensor.hive_heating_today
- name: Heating today
- show_icon: false
- icon: mdi:radiator
- action: navigate
- navigation_path: hive_history
- type: custom:decluttering-card
template: info_button
variables:
- entity: sensor.hive_water_today
- name: Water today
- show_icon: false
- icon: mdi:radiator
- type: custom:decluttering-card
template: info_button
variables:
- entity: switch.study_smartplug
- name: Study radiator
- show_icon: false
- on_colour: var(--state-climate-heat-color)
- off_colour: grey
- action: toggle
- type: history-graph
show_names: false
entities:
- entity: climate.hive_heat
#-------------------------------------------------------------------------------
- type: vertical-stack
title: Heating
cards:
- type: custom:decluttering-card
template: climate-influence_boost
variables:
- item: heating
- name: "[[[ return '➜ '+ states['sensor.hive_heating_target_temp'].state +'℃' ]]]"
- icon: "[[[ return states['sensor.hive_heating_target_temp'].attributes.icon ]]]"
- label: "[[[ return 'set by: ' + states['sensor.hive_heating_target_temp'].attributes.influence ]]]"
# influence
- type: conditional
conditions:
- entity: binary_sensor.hive_heating_doors_windows_open
state_not: 'off'
card:
type: markdown
content: >
<h3>Dr/win open:</h3>
{{ state_attr('binary_sensor.hive_heating_doors_windows_open','influence') }}
# schedule
- type: custom:text-divider-row
text: "Schedule & Settings"
- type: custom:decluttering-card
template: climate-schedule_heating
variables:
- schedule: 1
- scheduled_colour: Brown
- type: custom:decluttering-card
template: climate-schedule_heating
variables:
- schedule: 2
- action: none # day default - must not be toggled off
- type: custom:decluttering-card
template: climate-schedule_heating
variables:
- schedule: 3
- type: custom:decluttering-card
template: climate-schedule_heating
variables:
- schedule: 4
- type: custom:decluttering-card
template: climate-schedule_heating
variables:
- schedule: 5
- type: custom:decluttering-card
template: climate-schedule_heating
variables:
- schedule: 6
- scheduled_colour: Brown
- action: none # night default - must not be toggled off
# defaults
- type: custom:expander-card
title: Default settings
title-card-button-overlay: true
padding: 0em
gap: 0em
cards:
- type: entities
entities:
- type: custom:numberbox-card
entity: input_number.hive_heating_away_temp
name: Away
- type: custom:numberbox-card
entity: input_number.hive_heating_open_temp
name: Win/Drs
- type: divider
- type: custom:numberbox-card
entity: input_number.hive_heating_boost_temp
- type: custom:numberbox-card
entity: input_number.hive_heating_boost_time
- type: custom:decluttering-card
template: internals_automation
variables:
- automation: 'hive_heating_*'
#-------------------------------------------------------------------------------
- type: vertical-stack
title: Hot water
cards:
- type: custom:decluttering-card
template: climate-influence_boost
variables:
- item: heating
- name: "[[[ return '➜ '+ states['sensor.hive_water_target_mode'].state ]]]"
- icon: "[[[ return states['sensor.hive_water_target_mode'].attributes.icon ]]]"
- label: "[[[ return 'set by: ' + states['sensor.hive_water_target_mode'].attributes.influence ]]]"
- color: var(--state-active-color)
# schedule
- type: custom:text-divider-row
text: "Schedule & Settings"
- type: custom:decluttering-card
template: climate-schedule_water
variables:
- schedule: 1
- type: custom:decluttering-card
template: climate-schedule_water
variables:
- schedule: 2
- type: custom:decluttering-card
template: climate-schedule_water
variables:
- schedule: 3
- type: custom:decluttering-card
template: climate-schedule_water
variables:
- schedule: 4
# defaults
- type: custom:expander-card
title: Default settings
title-card-button-overlay: true
padding: 0em
gap: 0em
cards:
- type: custom:numberbox-card
entity: input_number.hive_water_boost_time
Decluttering cards
Note: I use these everywhere so may have functionality not used by the Hive view"
info_button
default:
- show_name: true
- name:
- show_state: true
- show_icon: true
# note attribute take precedence over label
- label: ''
- attribute: false
- icon:
- colour: gre
- show_border: true
# on / off
- on_value: 'on'
- on_operator: '=='
- on_colour: var(--state-active-color)
- on_icon:
- on_name:
- on_label: # for attribute ilo state
- on_box_shadow: false
- off_value: 'off'
- off_operator: '=='
- off_icon:
- off_label:
- off_name:
- off_colour: var(--state-inactive-color)
- off_box_shadow: false
# values: note box_shadow_[1,2,3] uses on_box_shadow
- value_1:
- value_2:
- value_3:
- operator_1: '=='
- operator_2: '=='
- operator_3: '=='
- icon_1:
- icon_2:
- icon_3:
- label_1:
- label_2:
- label_3:
- action: none
- hold_action: none
- condition_entity: input_boolean.dummy
- condition_state: "on"
card:
type: conditional
conditions:
- condition: state
entity: '[[condition_entity]]'
state: '[[condition_state]]'
card:
type: custom:button-card
entity: "[[entity]]"
show_name: '[[show_name]]'
name: '[[name]]'
show_icon: '[[show_icon]]'
show_state: '[[show_state]]'
show_label: "[[[ if ( [[label]] != '' || [[attribute]] != false ) return 'true'; else return 'false'; ]]]"
label: '[[label]]'
icon: '[[icon]]'
size: 30px
color: auto
color_type: icon
styles:
card:
- font-size: 15px
- border: "[[[ if ( '[[show_border]]' == 'false' ) return 'solid 0px'; ]]]"
icon:
- color: '[[colour]]'
state:
- color: '[[colour]]'
label:
- color: '[[colour]]'
state:
- value: '[[on_value]]'
operator: '[[on_operator]]'
icon: '[[on_icon]]'
name: '[[on_name]]'
label: '[[on_label]]'
styles:
card:
- box-shadow: "[[[ if ( '[[on_box_shadow]]' == 'true' ) return '0px 0px 9px 3px [[on_colour]]'; ]]]"
state:
- color: '[[on_colour]]'
icon:
- color: '[[on_colour]]'
label:
- color: '[[on_colour]]'
- value: '[[off_value]]'
operator: '[[off_operator]]'
icon: '[[off_icon]]'
name: '[[off_name]]'
label: '[[off_label]]'
styles:
card:
- box-shadow: "[[[ if ( '[[off_box_shadow]]' == 'true' ) return '0px 0px 9px 3px [[off_colour]]'; ]]]"
state:
- color: '[[off_colour]]'
icon:
- color: '[[off_colour]]'
label:
- color: '[[off_colour]]'
- value: '[[value_1]]'
operator: '[[operator_1]]'
icon: '[[icon_1]]'
label: '[[label_1]]'
styles:
card:
- box-shadow: "[[[ if ( '[[on_box_shadow]]' == 'true' ) return '0px 0px 9px 3px [[on_colour]]'; ]]]"
state:
- color: '[[colour_1]]'
icon:
- color: '[[colour_1]]'
label:
- color: '[[colour_1]]'
- value: '[[value_2]]'
operator: '[[operator_2]]'
icon: '[[icon_2]]'
label: '[[label_2]]'
styles:
card:
- box-shadow: "[[[ if ( '[[on_box_shadow]]' == 'true' ) return '0px 0px 9px 3px [[on_colour]]'; ]]]"
state:
- color: '[[colour_2]]'
icon:
- color: '[[colour_2]]'
label:
- color: '[[colour_2]]'
- value: '[[value_3]]'
operator: '[[operator_3]]'
icon: '[[icon_3]]'
label: '[[label_3]]'
styles:
card:
- box-shadow: "[[[ if ( '[[on_box_shadow]]' == 'true' ) return '0px 0px 9px 3px [[on_colour]]'; ]]]"
state:
- color: '[[colour_3]]'
icon:
- color: '[[colour_3]]'
label:
- color: '[[colour_3]]'
- value: "[[[ return entity.state == 'unknown' || entity.state == 'unavailable' || entity.state == 'offline' ]]]"
operator: 'template'
styles:
state:
- color: var(--error-color)
icon:
- color: var(--error-color)
label:
- color: var(--error-color)
tap_action:
action: "[[action]]"
navigation_path: "[[navigation_path]]"
url_path: "[[url_path]]"
service: '[[service]]'
data:
entity_id: '[[entity]]'
hold_action:
action: "[[hold_action]]"
climate-influence_boost
default:
- item: heating
card:
type: custom:layout-card
layout_type: custom:grid-layout
layout:
grid-template-columns: 3fr 1fr
grid-template-rows: auto
grid-template-areas: '"infl boost"'
cards:
- type: custom:button-card
view_layout:
grid-area: infl
entity: "sensor.hive_[[item]]_target_temp"
size: 30px
name: '[[name]]'
icon: '[[icon]]'
show_icon: true
show_state: false
show_label: true
label: '[[label]]'
layout: icon_name_state2nd
styles:
card:
- height: 60px
- font-size: 15px
name:
- color: var(--state-active-color)
- justify-self: start
label:
- justify-self: start
icon:
- color: var(--state-active-color)
tap_action:
action: none
- type: custom:button-card
view_layout:
grid-area: boost
entity: timer.hive_[[item]]_boost
name: >
[[[
if ( states['timer.hive_[[item]]_boost'].state == 'active' ) return 'Cancel Boost'
else return 'Boost'
]]]
icon: mdi:plus
size: 30px
color_type: icon
color: auto
show_state: false
styles:
card:
- height: 60px
- font-size: 15px
icon:
- color: var(--state-inactive-color)
state:
- value: "active"
styles:
icon:
- color: var(--state-active-color)
state:
- color: var(--state-active-color)
tap_action:
action: none
hold_action:
action: call-service
service: script.hive_[[item]]_toggle_boost
climate-schedule_heating
default:
- action: toggle
- scheduled_colour: SkyBlue
card:
type: custom:expander-card
title-card:
type: custom:button-card
entity: 'input_boolean.hive_heating_[[schedule]]_scheduled'
size: 30px
card_size: 1
show_name: true
name: |
[[[
if ( '[[schedule]]' == '2' ) return 'Awake';
if ( '[[schedule]]' == '6' ) return 'Asleep';
else return states['input_datetime.hive_heating_[[schedule]]'].state.slice(0,-3);
]]]
show_icon: true
icon: mdi:calendar-remove
show_state: false
show_label: true
label: "[[[ if ( states['input_boolean.hive_heating_[[schedule]]_scheduled'].state === 'on' ) return '➜ ' + states['input_number.hive_heating_[[schedule]]_temp'].state + ' ℃'; ]]]"
layout: icon_name
styles:
card:
- height: 50px
- padding: 5px
- font-size: 15px
grid:
- grid-template-areas: '"i n l"'
- grid-template-rows: 40px
- grid-template-columns: 20% 20% 60%
name:
- color: var(--state-inactive-color)
- justify-self: start
label:
- color: var(--state-inactive-color)
- justify-self: start
icon:
- color: var(--state-inactive-color)
state:
# heating
- operator: template
value: "[[[ return states['sensor.hive_heating_target_temp'].attributes.influence.slice(-1) == [[schedule]] ]]]"
icon: mdi:radiator
styles:
card:
- box-shadow: 0px 0px 9px 3px var(--state-active-color)
name:
- color: var(--state-active-color)
icon:
- color: var(--state-active-color)
label:
- color: var(--state-active-color)
# scheduled
- value: "on"
icon: mdi:calendar-check-outline
styles:
name:
- color: '[[scheduled_colour]]'
icon:
- color: '[[scheduled_colour]]'
label:
- color: '[[scheduled_colour]]'
tap_action:
action: none
hold_action:
action: '[[action]]'
# end of title card --------------------------------------------------------
title-card-button-overlay: true
padding: 0em
gap: 0em
cards:
- type: custom:vertical-stack-in-card
cards:
- type: conditional # dont show 'on' if [[schedule]] is 2 or 6
conditions:
- entity: input_datetime.hive_heating_[[schedule]]
state_not: 'unavailable'
card:
type: custom:time-picker-card
entity: input_datetime.hive_heating_[[schedule]]
name: Time
link_values: true
layout:
align_controls: right
name: inside
thin: true
tap_action:
action: none
- type: custom:numberbox-card
entity: input_number.hive_heating_[[schedule]]_temp
name: Temp
climate-schedule_water
card:
type: custom:expander-card
title-card: #-----------------------------------------------------------------
type: custom:button-card
entity: 'input_boolean.hive_water_[[schedule]]_scheduled'
size: 30px
card_size: 1
show_name: true
name: "[[[ return states['input_datetime.hive_water_[[schedule]]_on'].state.slice(0,-3) ]]]"
show_icon: true
icon: mdi:calendar-remove
show_state: false
show_label: true
label: "[[[ if ( states['input_boolean.hive_water_[[schedule]]_scheduled'].state === 'on' ) return 'for ' + states['input_number.hive_water_[[schedule]]_time'].state + ' Hr(s)'; ]]]"
layout: icon_name
styles:
card:
- height: 50px
- padding: 5px
- font-size: 15px
grid:
- grid-template-areas: '"i n l"'
- grid-template-rows: 40px
- grid-template-columns: 20% 20% 60%
name:
- color: var(--state-inactive-color)
- justify-self: start
label:
- color: var(--state-inactive-color)
- justify-self: start
icon:
- color: var(--state-inactive-color)
state:
# On
- operator: template
value: "[[[ return states['sensor.hive_water_target_mode'].attributes.influence.slice(-1) == [[schedule]] ]]]"
icon: mdi:water-pump
styles:
card:
- box-shadow: 0px 0px 9px 3px var(--state-active-color)
name:
- color: var(--state-active-color)
icon:
- color: var(--state-active-color)
label:
- color: var(--primary-text-color)
# scheduled
- value: "on"
icon: mdi:calendar-check-outline
styles:
name:
- color: var(--primary-text-color)
icon:
- color: var(--primary-text-color)
label:
- color: var(--primary-text-color)
tap_action:
action: none
hold_action:
action: toggle
# end of title card --------------------------------------------------------
title-card-button-overlay: true
padding: 0em
gap: 0em
cards:
- type: custom:vertical-stack-in-card
cards:
- type: custom:time-picker-card
entity: input_datetime.hive_water_[[schedule]]_on
name: Time
link_values: true
layout:
align_controls: right
name: inside
thin: true
tap_action:
action: none
- type: custom:numberbox-card
entity: input_number.hive_water_[[schedule]]_time
name: Duration
climate-info-temperature
card:
type: custom:vertical-stack-in-card
horizontal: true
cards:
- type: custom:decluttering-card
template: info_button
variables:
- entity: sensor.coldest_temp
- name: Coldest
- icon: mdi:thermometer-low
- colour: LightBlue
- action: navigate
- navigation_path: weather_temp
- type: custom:decluttering-card
template: info_button
variables:
- entity: sensor.coldest_heated_temp
- name: heated
- icon: mdi:thermometer
- colour: LightBlue
- action: navigate
- navigation_path: weather_temp
- type: custom:decluttering-card
template: info_button
variables:
- entity: sensor.hottest_temp
- name: Hottest
- icon: mdi:thermometer-high
- colour: pink
- action: navigate
- navigation_path: weather_temp
climate-info
default:
- action: none
card:
type: vertical-stack
cards:
- type: custom:vertical-stack-in-card
horizontal: true
cards:
- type: custom:layout-card
layout_type: custom:grid-layout
layout:
grid-template-columns: auto
grid-template-rows: auto
grid-template-areas: '"down hive up"'
cards:
# down ---------------------------------------
- type: conditional
conditions:
- entity: sensor.hive_heating_reported_mode
state_not: "off"
card:
type: custom:button-card
view_layout:
grid-area: down
entity: sensor.hive_heating_reported_target_temp
size: 30px
show_name: true
name: Set target
show_state: false
show_label: true
label: "[[[ return (entity.state -0.5) + '℃' ]]]"
icon: mdi:thermometer-minus
styles:
card:
- font-size: 15px
- color: grey
icon:
- color: LightBlue
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.hive_heating_decrease_setpoint
# hive ---------------------------------------
- type: custom:button-card
view_layout:
grid-area: hive
entity: binary_sensor.hive_heating_reported_action
size: 30px
show_name: false
name: "Actual"
show_state: false
show_icon: true
icon: "[[[ if ( states['binary_sensor.hive_heating_reported_action'].state == 'off') return 'mdi:radiator-disabled'; else return 'mdi:radiator'; ]]]"
show_label: false
label: >
[[[
if ( states['sensor.hive_heating_reported_mode'].state == 'off' ) return '(off)';
if ( states['timer.hive_heating_boost'].state == 'active' ) return states['sensor.hive_heating_reported_target_temp'].state +'<font color="grey"> (Boost)</font>';
else return '<font color="grey"> (' + states['binary_sensor.hive_heating_reported_action'].state+')</font>';
]]]
custom_fields:
ts: "[[[ if ( states['sensor.hive_heating_reported_mode'].state == 'off' ) return 'off'; else return states['sensor.hive_heating_reported_target_temp'].state + '℃' ]]]"
tn: "Target"
cs: "[[[ return states['sensor.hive_heating_reported_current_temp'].state + '℃' ]]]"
cn: "Actual"
styles:
grid:
- grid-template-areas: |
"i i"
"s s"
"tn cn"
"ts cs"
- grid-template-columns: auto
card:
- font-size: 15px
- border: 0px solid
icon:
- color: >
[[[
if ( states['sensor.hive_heating_reported_mode'].state == 'off' ) return 'grey';
else if ( states['binary_sensor.hive_heating_reported_action'].state == 'off' ) return 'LightBlue';
else return 'var(--state-climate-heat-color)';
]]]
state:
- color: "[[[ if ( states['sensor.hive_heating_reported_mode'].state == 'off' ) return 'grey'; else return 'orange'; ]]]"
custom_fields:
tn:
- color: grey
cn:
- color: grey
ts:
- color: "[[[ if ( states['sensor.hive_heating_reported_mode'].state == 'off' ) return 'grey'; ]]]"
cs:
- color: >
[[[
if ( states['sensor.hive_heating_reported_current_temp'].state < states['sensor.hive_heating_reported_target_temp'].state ) return 'LightBlue';
else if ( states['sensor.hive_heating_reported_current_temp'].state > states['sensor.hive_heating_reported_target_temp'].state ) return 'orange';
]]]
tap_action:
action: more-info
# up ---------------------------------------
- type: conditional
conditions:
- entity: sensor.hive_heating_reported_mode
state_not: "off"
card:
type: custom:button-card
view_layout:
grid-area: up
entity: sensor.hive_heating_reported_target_temp
size: 30px
show_name: true
name: Set target
show_state: false
show_label: true
label: "[[[ return (+entity.state +0.5) + '℃' ]]]"
icon: mdi:thermometer-plus
styles:
card:
- font-size: 15px
- color: grey
icon:
- color: orange
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.hive_heating_increase_setpoint
internals_automation
default:
- title: ''
- slice: 0
card:
type: custom:auto-entities
show_empty: false
card:
type: entities
title: '[[title]]'
show_header_toggle: false
sort:
method: name
filter:
include:
- entity_id: 'automation.[[automation]]'
options:
type: custom:button-card
entity: this.entity_id
show_state: true
name: "[[[ return entity.attributes.friendly_name.slice([[slice]]) ]]]"
styles:
grid:
- grid-template-areas: '". n s"'
- grid-template-columns: 1em 1fr 2em
card:
- height: 40px
- padding: 0
name:
- justify-self: start
- font-size: 14px
- color: "[[[ if (entity.state == 'off') return 'grey'; else return 'lightgrey'; ]]]"
state:
- color: "[[[ if (entity.state == 'off') return 'brown'; else return 'green'; ]]]"
- font-weight: bold
tap_action:
action: toggle
hold_action:
action: more-info
OK, this has taken a little time to write/edit so I apologise if there are any typos. Just ask if something doesn’t work. Please test it to ensure it works for you.
I’ll repost the packages shortly (the forum would not let me put it all on one post.
[Edited for clarity and typos]