A list item widget for displaying the current status of a battery. The icon and icon color will change based on the current battery level: <25% red, 25% to 75% orange, >75% green. The widget assumes the battery level is represented by a number between 0 and 100. Clicking on the widget brings up a chart of the historic values.
Screenshots
Changelog
Version 0.1
- initial release
Resources
uid: rlk_battery_list
tags:
- list
- battery
props:
parameters:
- description: Battery name
label: Name
name: title
required: false
type: TEXT
- context: item
description: Battery Item to display
label: Item
name: item
required: false
type: TEXT
parameterGroups: []
component: oh-label-item
config:
icon: '=(Number.parseInt(items[props.item].state) > 75) ? "f7:battery_100" : (Number.parseInt(items[props.item].state) > 25) ? "f7:battery_25" : "f7:battery_0"'
iconColor: '=(Number.parseInt(items[props.item].state) > 75) ? "green" : (Number.parseInt(items[props.item].state) > 25) ? "yellow" : "red"'
title: =props.title
item: =props.item
action: analyzer
actionAnalyzerCoordSystem: time
actionAnalyzerItems: =[props.item]