Volume Slider

A volume control list widget that changes the icon based on the loudness.

This widget is configured with a single Volume Item but expect there to be an associated Idling Item which when it is false the widget will not be shown. The names are expected to be:

  • <Prefix>_Volume : Item that controls the volume
  • <Prefix>_Idling : Switch Item that when ON the widget is not shown

Screenshots




Changelog

Version 0.1

  • initial release

Resources

uid: rlk_volume_setpoint_list
tags:
  - list
  - media
props:
  parameters:
    - description: Player name
      label: Name
      name: name
      required: false
      type: TEXT
    - context: item
      description: Item
      label: Volume Item
      name: item
      required: true
      type: TEXT
  parameterGroups: []
timestamp: Feb 4, 2021, 4:16:07 PM
component: oh-slider-item
config:
  icon: '=(Number.parseInt(items[props.item].state) == 0) ? "f7:speaker_slash" : (Number.parseInt(items[props.item].state) < 25) ? "f7:speaker" : (Number.parseInt(items[props.item].state) < 50) ? "f7:speaker_1" : (Number.parseInt(items[props.item].state) < 75) ? "f7:speaker_2" : "f7:speaker_3"'
  iconColor: black
  title: =props.name
  min: 0
  max: 100
  step: 10
  item: =props.item
  scaleSteps: 10
  scaleSubSteps: 5
  color: black
  label: true
  visible: =(items[props.item.replace("Volume", "Idling")].state == "OFF")