A widget to display solar power / storage information retrieved from a Senec Home Thing (Senec Home - Bindings | openHAB)
I’m just getting started with the widget UI development, so feedback is very welcome.
At this stage, all configuration items are required and I’m testing, which values to display and which to hide.
Changelog
Version 0.1
- initial release
Resources
uid: gw_senechome_list_item_widget
tags:
- list
- senechome
props:
parameters:
- default: iconify:game-icons:solar-power
description: Use f7:iconName (Framework7 icon), material:iconName (Material icon) or iconify:iconSet:iconName
label: Icon
name: senecHomeIcon
required: false
type: TEXT
groupName: header
- context: item
description: SENEC Home System State item
label: Item
name: senecHomeSystemkStateItem
required: false
type: TEXT
groupName: header
- context: item
description: SENEC Home Temperature item
label: Item
name: senecHomeTemperatureItem
required: false
type: TEXT
groupName: temperature
- default: SENEC Home Temperature
label: Temperature Name
name: senecHomeTemperatureItemTitle
required: false
type: TEXT
groupName: temperature
- context: item
description: SENEC Home Secondary Temperature item
label: Item
name: senecHomeSecondaryTemperatureItem
required: false
type: TEXT
groupName: temperature
- default: SENEC Home Secondary Temperature
label: Secondary Temperature Name
name: senecHomeSecondaryTemperatureItemTitle
required: false
type: TEXT
groupName: temperature
- context: item
description: SENEC Home Battery Fuel item
label: Item
name: senecHomeBatteryFuelItem
required: false
type: TEXT
groupName: battery
- context: item
description: SENEC Home Battery Power item
label: Item
name: senecHomeBatteryPowerItem
required: false
type: TEXT
groupName: battery
- default: House Power Consumption
label: Title
name: senecHomeHousePowerConsumptionItemTitle
required: false
type: TEXT
groupName: grid
- context: item
description: House Power Consumption
label: Item
name: senecHomeHousePowerConsumptionItem
required: false
type: TEXT
groupName: grid
- default: Solar Production
label: Title
name: senecHomeSolarProductionItemTitle
required: false
type: TEXT
groupName: solar
- context: item
description: SENEC Home Solar Production item
label: Item
name: senecHomeSolarProductionItem
required: false
type: TEXT
groupName: solar
- default: Grid Draw
label: Title
name: senecHomeGridDrawItemTitle
required: false
type: TEXT
groupName: grid
- context: item
description: SENEC Home Grid Draw item
label: Item
name: senecHomeGridDrawItem
required: false
type: TEXT
groupName: grid
- default: Grid Supply
label: Title
name: senecHomeGridSupplyItemTitle
required: false
type: TEXT
groupName: grid
- context: item
description: SENEC Home Grid Supply item
label: Item
name: senecHomeGridSupplyItem
required: false
type: TEXT
groupName: grid
parameterGroups:
- name: header
label: Header
- name: solar
label: Solar
- name: grid
label: Grid
- name: battery
label: Battery
- name: temperature
label: Temperature
timestamp: Oct 29, 2022, 3:29:44 PM
component: oh-list-item
config:
icon: =props.senecHomeIcon
iconColor: '=(items[props.senecHomeSystemkStateItem].state == "CHARGE") ? "green" : "red"'
style:
--f7-list-item-after-font-size: 16px
--f7-list-item-after-text-color: "=themeOptions.dark === 'dark' ? 'rgb(180,180,180)' : 'rgb(80,80,80)'"
subtitle: '="Battery: " + (items[props.senecHomeBatteryFuelItem].state) + ", Solar: " + (items[props.senecHomeSolarProductionItem].state) + ", " + ((items[props.senecHomeSystemkStateItem].state == "CHARGE") ? "Charging: " : "Discharging: ") + (items[props.senecHomeBatteryPowerItem].state)'
title: ="System State:" + " " + items[props.senecHomeSystemkStateItem].state
slots:
accordion:
- component: f7-list
config:
mediaList: true
style:
background-color: "=themeOptions.dark === 'dark' ? 'rgb(35, 35, 35)' : 'rgb(247, 247, 247)'"
slots:
default:
- component: oh-label-item
config:
icon: iconify:emojione:sun
iconColor: gray
item: =props.senecHomeSolarProductionItem
style:
--f7-list-item-after-font-size: 15px
--f7-list-item-after-text-color: "=themeOptions.dark === 'dark' ? 'rgb(180,180,180)' : 'rgb(100,100,100)'"
--f7-list-item-title-font-size: 15px
--f7-list-item-title-text-color: "=themeOptions.dark === 'dark' ? 'rgb(180,180,180)' : 'rgb(100,100,100)'"
title: =props.senecHomeSolarProductionItemTitle
- component: oh-label-item
config:
icon: iconify:emojione-v1:house
iconColor: green
item: =props.senecHomeHousePowerConsumptionItem
style:
--f7-list-item-after-font-size: 15px
--f7-list-item-after-text-color: "=themeOptions.dark === 'dark' ? 'rgb(180,180,180)' : 'rgb(100,100,100)'"
--f7-list-item-title-font-size: 15px
--f7-list-item-title-text-color: "=themeOptions.dark === 'dark' ? 'rgb(180,180,180)' : 'rgb(100,100,100)'"
title: =props.senecHomeHousePowerConsumptionItemTitle
- component: oh-label-item
config:
icon: '=(Number.parseFloat(items[props.senecHomeGridSupplyItem].state)) ? "iconify:akar-icons:arrow-forward-thick-fill" : "iconify:akar-icons:arrow-back-thick-fill"'
iconColor: '=(Number.parseFloat(items[props.senecHomeGridSupplyItem].state)) ? "green" : "red"'
item: "=(Number.parseFloat(items[props.senecHomeGridSupplyItem].state)) ? props.senecHomeGridSupplyItem : props.senecHomeGridDrawItem"
style:
--f7-list-item-after-font-size: 15px
--f7-list-item-after-text-color: "=themeOptions.dark === 'dark' ? 'rgb(180,180,180)' : 'rgb(100,100,100)'"
--f7-list-item-title-font-size: 15px
--f7-list-item-title-text-color: "=themeOptions.dark === 'dark' ? 'rgb(180,180,180)' : 'rgb(100,100,100)'"
--f7-list-item-subtitle-font-size: 14px
--f7-list-item-subtitle-text-color: "=themeOptions.dark === 'dark' ? 'rgb(180,180,180)' : 'rgb(100,100,100)'"
title: "=(Number.parseFloat(items[props.senecHomeGridSupplyItem].state)) ? props.senecHomeGridSupplyItemTitle : props.senecHomeGridDrawItemTitle"
subtitle: ="Draw:" + " " + items[props.senecHomeGridDrawItem].state + " / " + "Supply:" + " " + items[props.senecHomeGridSupplyItem].state
- component: oh-label-item
config:
icon: iconify:carbon:temperature-celsius
iconColor: grey
item: =props.senecHomeTemperatureItem
style:
--f7-list-item-after-font-size: 15px
--f7-list-item-after-text-color: "=themeOptions.dark === 'dark' ? 'rgb(180,180,180)' : 'rgb(100,100,100)'"
--f7-list-item-title-font-size: 15px
--f7-list-item-title-text-color: "=themeOptions.dark === 'dark' ? 'rgb(180,180,180)' : 'rgb(100,100,100)'"
--f7-list-item-subtitle-font-size: 14px
--f7-list-item-subtitle-text-color: "=themeOptions.dark === 'dark' ? 'rgb(180,180,180)' : 'rgb(100,100,100)'"
title: =props.senecHomeTemperatureItemTitle
subtitle: =" " + props.senecHomeSecondaryTemperatureItemTitle + ":" + " " + items[props.senecHomeSecondaryTemperatureItem].state