Let me share with you a widget specifically for Daikin HVAC systems in “dark mode” with a few additonal options.
(I tried to give it a similar look as the OH3 widget: Grafana chart with time ranges.)
I used the Intensis aircon controller developed by @hmerk as a starting point.
Thank you for the great work!
@RGroll supported me with the functionality to hide/unhide rows by clicking on buttons or toggle switches in props. Thank you so much!
The widget supports the following features:
- Switch HVAC ON/OFF
- Set target temperature
- Show Indoor/Outdoor temperature
- Set Mode (Auto/Cool/Heat…)
- Set fan speed via option button
- Set fan swing via option button
Additional options can be activated via props:
- Enable timer function (e.g. to switch on “cooling” for 30min)
- Show power generated from solar plant / photovoltaic system
Open topics:
- UoM (°C) missing on the oh-knob
this is not supported yet, I think. Am I right? - The text on the buttons below the icons is not centered, whereas the icons (I believe) are.
Any idea how to solve that?
Resources
YAML (updated on 2021-03-09 with optimized code and compatibility for dark & light-theme):
uid: Daikin HVAC
tags: []
props:
parameters:
- description: Location (room) or device name
label: Title
name: title
required: false
type: TEXT
- context: item
description: Item for power channel
label: Power
name: itemPower
required: false
type: TEXT
- context: item
description: Item for indoor temperature channel
label: Indoor temperature
name: itemIndoorTemp
required: false
type: TEXT
- context: item
description: Item for outdoor temperature channel
label: Outdoor temperature
name: itemOutdoorTemp
required: false
type: TEXT
- context: item
description: Item for target temperature channel
label: Target temperature
name: itemTargetTemp
required: false
type: TEXT
- description: Set minimum target temperature (default = 0)
label: Minimum Temperature
name: MinimumTemperature
required: false
type: INTEGER
- description: Set maximum target temperature (default = 100)
label: Maximum Temperature
name: MaximumTemperature
required: false
type: INTEGER
- description: Set Target Temperature Stepsize (default = 1)
label: Target Temperature Stepsize
name: TemperatureStepsize
required: false
type: DECIMAL
- context: item
description: Item for operation mode channel
label: Operation mode
name: itemMode
required: false
type: TEXT
- context: item
description: Item for fan speed channel
label: Fan speed
name: itemFanSpeed
required: false
type: TEXT
- context: item
description: Item for swing channel
label: Swing mode
name: itemSwing
required: false
type: TEXT
- description: Hide timer button and options
label: Hide Timer Function
name: hideTimerFunction
required: false
type: BOOLEAN
- context: item
description: Switch item for timer
label: Switch Timer ON/OFF
name: itemTimerSwitch
required: false
type: TEXT
advanced: true
- context: item
description: Item for timer duration
label: Timer Duration
name: itemTimerDuration
required: false
type: TEXT
advanced: true
- description: Timer minimum duration
label: Timer minimum
name: TimerMinimum
required: false
type: DECIMAL
advanced: true
- description: Timer maximum duration
label: Timer maximum
name: TimerMaximum
required: false
type: DECIMAL
advanced: true
- description: Timer step
label: Timer step
name: TimerStep
required: false
type: DECIMAL
advanced: true
- description: Timer scale steps
label: Timer scale steps
name: TimerScaleSteps
required: false
type: DECIMAL
advanced: true
- description: Timer scale sub steps
label: Timer scale sub steps
name: TimerScaleSubSteps
required: false
type: DECIMAL
advanced: true
- description: Hide solarplant power
label: Hide Solarplant AC power measurement
name: hideSolarplant
required: false
type: BOOLEAN
- context: item
description: AC Power item for solarplant
label: Solarplant AC Power
name: itemSolarplantACPower
required: false
type: TEXT
advanced: true
parameterGroups: []
timestamp: Mar 8, 2021, 7:41:03 PM
component: f7-card
config:
title: =props.title
outline: true
class:
- no-padding
slots:
default:
- component: f7-row
config:
class:
- margin-top-half
- margin-left-half
- margin-right-half
- margin-bottom
slots:
default:
- component: f7-col
config:
width: "50"
large: "33"
slots:
default:
- component: f7-segmented
config:
class:
- segmented-strong
style:
--f7-segmented-strong-padding: 0px
--f7-segmented-strong-between-buttons: 5px
--f7-segmented-strong-button-font-weight: 300
--f7-segmented-strong-bg-color: transparent
--f7-segmented-strong-button-hover-bg-color: rgba(var(--f7-theme-color-rgb), 0.07)
--f7-button-fill-hover-bg-color: var(--f7-theme-color)
--f7-button-border-radius: 4px
--f7-button-padding-vertical: 0px
--f7-button-padding-horizontal: 0px
slots:
default:
- component: oh-button
config:
outline: true
class:
- padding-top-half
- display-flex
- flex-direction-column
text: ON/OFF
action: toggle
actionItem: =props.itemPower
actionCommand: ON
actionCommandAlt: OFF
icon-f7: power
iconSize: 15
fill: "=(items[props.itemPower].state === 'ON') ? true : false"
style:
--f7-button-border-width: 1px
--f7-button-border-color: var(--f7-card-outline-border-color)
height: auto
font-size: 8px
- component: oh-button
config:
visible: =!props.hideTimerFunction
text: TIMER
action: toggle
actionItem: =props.itemTimerSwitch
actionCommand: ON
actionCommandAlt: OFF
iconF7: timer
iconSize: 15px
fill: "=(items.ac_timer_on_off.state === 'ON') ? true : false"
outline: false
class:
- display-flex
- flex-direction-column
- padding-top-half
style:
--f7-button-border-width: 1px
--f7-button-border-color: var(--f7-card-outline-border-color)
font-size: 8px
height: auto
- component: f7-col
config:
width: "33"
slots:
default:
- component: f7-row
config:
class:
- padding-right-half
slots:
default:
- component: f7-col
config:
width: "25"
slots:
default:
- component: f7-icon
config:
class:
- float-right
f7: house
size: 15
color: var(--f7-theme-color)
- component: f7-col
config:
width: "75"
slots:
default:
- component: Label
config:
class:
- float-right
text: =items[props.itemIndoorTemp].state
style:
white-space: nowrap
overflow: hidden
text-overflow: elipsis
font-size: 12px
- component: f7-row
config:
class:
- padding-right-half
slots:
default:
- component: f7-col
config:
width: "25"
slots:
default:
- component: f7-icon
config:
class:
- float-right
f7: tree
size: 15
color: var(--f7-theme-color)
- component: f7-col
config:
width: "75"
slots:
default:
- component: Label
config:
class:
- float-right
text: =items[props.itemOutdoorTemp].state
style:
white-space: nowrap
overflow: hidden
text-overflow: elipsis
font-size: 12px
- component: f7-row
config:
visible: =!props.hideSolarplant
class:
- padding-right-half
slots:
default:
- component: f7-col
config:
width: "25"
slots:
default:
- component: f7-icon
config:
class:
- float-right
f7: sun_max
size: 15
color: var(--f7-theme-color)
- component: f7-col
config:
width: "75"
slots:
default:
- component: Label
config:
class:
- float-right
text: =items[props.itemSolarplantACPower].state
style:
white-space: nowrap
overflow: hidden
text-overflow: elipsis
font-size: 12px
- component: f7-row
config:
class:
- justify-content-center
slots:
default:
- component: oh-knob
config:
item: =props.itemTargetTemp
min: =props.MinimumTemperature
max: =props.MaximumTemperature
stepSize: =props.TemperatureStepsize
secondaryColor: var(--f7-card-outline-border-color)
primaryColor: var(--f7-theme-color)
responsive: false
strokeWidth: "12"
size: 150
- component: f7-segmented
config:
visible: true
class:
- margin-left-half
- margin-right-half
- margin-top
- margin-bottom-half
style:
--f7-button-font-size: 8px
--f7-button-text-color: "=themeOptions.dark === 'light' ? 'black' : 'white'"
--f7-button-border-radius: 4px
--f7-button-outline-border-width: 1px
--f7-button-font-weight: 300
--f7-button-padding-vertical: 0px
--f7-button-padding-horizontal: 0px
slots:
default:
- component: oh-repeater
config:
sourceType: array
for: modeRow
in:
- icon: arrow_2_squarepath
command: AUTO
text: AUTO
- icon: thermometer_snowflake
command: COLD
text: COOL
- icon: thermometer_sun
command: HEAT
text: HEAT
- icon: drop_fill
command: DEHUMIDIFIER
text: DRY
- icon: wind
command: FAN
text: FAN
fragment: true
slots:
default:
- component: oh-button
config:
iconF7: =loop.modeRow.icon
iconSize: 15px
fill: "=(items[props.itemMode].state === loop.modeRow.command) ? true : false"
outline: true
class:
- display-flex
- flex-direction-column
- padding-top-half
style:
--f7-button-border-color: var(--f7-card-outline-border-color)
height: auto
text: =loop.modeRow.text
action: command
actionItem: =props.itemMode
actionCommand: =loop.modeRow.command
- component: oh-button
config:
iconF7: ellipsis_vertical
iconSize: 15px
action: variable
actionVariable: options
actionVariableValue: "=vars.options || vars.options === undefined ? false : true"
fill: "=vars.options || vars.options === undefined ? false : true"
outline: true
class:
- display-flex
- flex-direction-column
style:
--f7-button-border-color: var(--f7-card-outline-border-color)
height: auto
width: 50%
- component: f7-segmented
config:
visible: =vars.options === false
class:
- margin-left-half
- margin-right-half
- margin-top
- margin-bottom-half
style:
--f7-button-font-size: 8px
--f7-button-text-color: "=themeOptions.dark === 'light' ? 'black' : 'white'"
--f7-button-border-radius: 4px
--f7-button-outline-border-width: 1px
--f7-button-font-weight: 300
--f7-button-padding-vertical: 0px
--f7-button-padding-horizontal: 0px
slots:
default:
- component: oh-repeater
config:
sourceType: array
for: optionsRow
in:
- icon: wind ellipsis_vertical
option: fanspeed
- icon: move ellipsis_vertical
option: swing
fragment: true
slots:
default:
- component: oh-button
config:
iconF7: =loop.optionsRow.icon
iconSize: 15px
fill: "=vars[loop.optionsRow.option] || vars[loop.optionsRow.option] === undefined ? false : true"
outline: true
class:
- display-flex
- flex-direction-column
style:
--f7-button-border-color: var(--f7-card-outline-border-color)
height: auto
action: variable
actionVariable: =loop.optionsRow.option
actionVariableValue: "=vars[loop.optionsRow.option] || vars[loop.optionsRow.option] === undefined ? false : true"
- component: oh-button
config:
visible: =!props.hideTimerFunction
action: variable
actionVariable: timer_menu
actionVariableValue: "=vars.timer_menu || vars.timer_menu === undefined ? false : true"
fill: "=vars.timer_menu || vars.timer_menu === undefined ? false : true"
iconF7: timer ellipsis_vertical
iconSize: 15px
outline: true
style:
--f7-button-border-color: var(--f7-card-outline-border-color)
- component: f7-segmented
config:
visible: "=vars.fanspeed === false && vars.options === false ? true : false"
class:
- margin-left-half
- margin-right-half
- margin-top
- margin-bottom-half
style:
--f7-button-text-color: "=themeOptions.dark === 'light' ? 'black' : 'white'"
--f7-button-border-radius: 4px
--f7-button-outline-border-width: 1px
--f7-button-font-weight: 300
--f7-button-padding-vertical: 0px
--f7-button-padding-horizontal: 0px
slots:
default:
- component: oh-repeater
config:
sourceType: array
for: fanspeedRow
in:
- icon: arrow_2_squarepath
command: AUTO
- icon: zzz
command: SILENCE
- command: LEVEL_1
text: 1
- command: LEVEL_2
text: 2
- command: LEVEL_3
text: 3
- command: LEVEL_4
text: 4
- command: LEVEL_5
text: 5
fragment: true
slots:
default:
- component: oh-button
config:
iconF7: =loop.fanspeedRow.icon
iconSize: 15px
fill: "=(items[props.itemFanSpeed].state === loop.fanspeedRow.command) ? true : false"
outline: true
class:
- display-flex
- flex-direction-column
style:
--f7-button-border-color: var(--f7-card-outline-border-color)
height: auto
text: =loop.fanspeedRow.text
action: command
actionItem: =props.itemFanSpeed
actionCommand: =loop.fanspeedRow.command
- component: f7-segmented
config:
visible: "=vars.swing === false && vars.options === false ? true : false"
class:
- margin-left-half
- margin-right-half
- margin-top
- margin-bottom-half
style:
--f7-button-text-color: "=themeOptions.dark === 'light' ? 'black' : 'white'"
--f7-button-border-radius: 4px
--f7-button-outline-border-width: 1px
--f7-button-font-weight: 300
--f7-button-padding-vertical: 0px
--f7-button-padding-horizontal: 0px
slots:
default:
- component: oh-repeater
config:
sourceType: array
for: swingRow
in:
- command: STOPPED
text: OFF
- icon: resize_v
command: VERTICAL
- icon: resize_h
command: HORIZONTAL
- icon: view_3d
command: VERTICAL_AND_HORIZONTAL
fragment: true
slots:
default:
- component: oh-button
config:
iconF7: =loop.swingRow.icon
iconSize: 15px
fill: "=(items[props.itemSwing].state === loop.swingRow.command) ? true : false"
outline: true
class:
- display-flex
- flex-direction-column
style:
--f7-button-border-color: var(--f7-card-outline-border-color)
height: auto
text: =loop.swingRow.text
action: command
actionItem: =props.itemSwing
actionCommand: =loop.swingRow.command
- component: f7-row
config:
visible: "=vars.timer_menu === false && vars.options === false && !props.hideTimerFunction === true ? true : false"
class:
- margin-left-half
- margin-right-half
- margin-bottom-half
slots:
default:
- component: f7-col
slots:
default:
- component: oh-slider-card
config:
outline: true
item: =props.itemTimerDuration
min: =props.TimerMinimum
max: =props.TimerMaximum
step: =props.TimerStep
scaleSteps: =props.TimerScaleSteps
scaleSubSteps: =props.TimerScaleSubSteps
scale: true
unit: min
label: true
Hope some of you find it useful