A simple widget that changes the color and icon based on a light sensor’s reading: < 50 black, 50 to 150 gray, 150 to 350 orange, > 350 yellow.
Screenshots
Changelog
Version 0.1
- initial release
Resources
uid: rlk_light_level_list
tags:
- list
- light
props:
parameters:
- description: Sensor name
label: Name
name: title
required: false
type: TEXT
- context: item
description: Item to display
label: Item
name: item
required: false
type: TEXT
parameterGroups: []
component: oh-label-item
config:
icon: '=(Number.parseFloat(items[props.item].state) < 250) ? "f7:light_min" : "f7:light_max"'
iconColor: '=(Number.parseFloat(items[props.item].state) < 50) ? "black" : (Number.parseFloat(items[props.item].state) < 150) ? "gray" : (Number.parsFloat(items[props.item].state) < 350) ? "orange" : "yellow"'
title: =props.title
item: =props.item
action: analyzer
actionAnalyzerCoordSystem: time
actionAnalyzerItems: =[props.item]