I’m making progress here. I’ve create a first version of a custom widget using oh-list-card as a container and oh-list-item for the HVAC mode selection. To give feedback of the selected items I’ve used the icon f7:circle for the non selected modes and f7:circle_fill for the selected state.
First version looks like this:
uid: HVAC Mode Widget
props:
parameters:
- description: Der Titel der Betriebsart
label: Titel
name: title
required: true
type: TEXT
- context: item
description: Das Item für das die Betriebsart eingestellt wird
label: Betriebsart Item
name: item
required: true
type: TEXT
parameterGroups: []
timestamp: Jan 3, 2021, 2:51:27 PM
component: oh-list-card
config:
title: =props.title
slots:
default:
- component: oh-list-item
config:
title: Komfort
action: command
actionItem: =props.item
actionCommand: Comfort
icon: "=items[props.item].state === 'Comfort' ? 'f7:circle_fill' : 'f7:circle'"
iconColor: red
- component: oh-list-item
config:
title: Standby
action: command
actionItem: =props.item
actionCommand: Standby
icon: "=items[props.item].state === 'Standby' ? 'f7:circle_fill' : 'f7:circle'"
iconColor: red
- component: oh-list-item
config:
title: Nachtabsenkung
action: command
actionItem: =props.item
actionCommand: Economy
icon: "=items[props.item].state === 'Economy' ? 'f7:circle_fill' : 'f7:circle'"
iconColor: red
- component: oh-list-item
config:
title: Frostschutz
action: command
actionItem: =props.item
actionCommand: Building Protection
icon: "=items[props.item].state === 'Building Protection' ? 'f7:circle_fill' : 'f7:circle'"
iconColor: red
based on your ideas i created my first heating widget with current temperature, the trend line and 4 buttons of mode selection with a stepper for manual temperature setting. First trial and error steps of the new YAML functionallity of OH3 for me. Not perfect yet, specifically on mobile where the text of the buttons disappear, but a start…
Thanks a lot.
So just to make sure I do everything the right way from begin:
To use a custom Widget, I have to define it at “Developer Tools” -> “Widgets”, then choose the widget in the metadata-options of each corresponding Equipment.
Cool, thanks a lot.
Is there an option to set fixed “points” in the widget?
For example: In my “semantic model”, I have 5 rooms, all of them have their equipment “Heating”. Each “Heating” has its Points:
“mode”
“actual temperature”
“setpoint temperature”
Now when I add the widget to the equipment, it would be nice if the points will be set automaticilly.
Is this possible?
I believe yes and i have this for 4 rooms as well, but in my case the mode is triggered by a rule with numbers 0-3 that fires the mode to a “virtual” item which sets the mode with a sendCommand(…) . You can see this in the widget code. Not sure how you set your mode. It was a quick and dirty widget for my specific case but could be extended to be used for other specific cases as well.
i understand that the line is not showing on the widget, correct? The item trendItem is responsible for the line of temperature in the widget. the actionAnalzyerItems are set for the popover graph. Just a guess, did you persist this item?
widget: including trend item:
popover graph, actionAnalyzer, comparing set and current temperature:
Hi, this is a standard OH3 Label Cell, no specific changes made, everything is on board features of the OH3 label cell.
below is the YAML code. The item “Iphone_Sw” is a group of my iphones which turns to ON if one of the member is @home. The popup shows the group details.
component: oh-label-cell
config:
icon: f7:house
item: Iphone_Sw
color: green
action: group
actionGroupPopupItem: Iphone_Sw
footer: status Anwesenheit
header: Presence
This are three separate widgets in a row…
Unfortunately, I haven’t figured out how to insert some spacebetween the widgets (indicated by the red lines)
Could someone point me in the right direction how to acchieve this?
The second thing I’m struggling with is the analyzer action. The analyzer opens, but the window remain empty. Is something wrong with the following YAML?