This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

configs.gg23.audio: crossed out speaker for routes that are off

+5 -1
+5 -1
configs/gg23/audio/hub.nix
··· 105 105 ''{% set col = states.switch | selectattr('entity_id', 'search', '^switch\\.audio_route_.*_${r}$') | map(attribute='entity_id') | list %}{% set ns.out = ns.out + [{"type": "vertical-stack", "cards": [{"type": "tile", "entity": "number.audio_volume_${r}", "name": "${rooms.${r}}", "icon": "mdi:speaker", "features": [{"type": "numeric-input", "style": "slider"}]}, ${ 106 106 allButton "All off" "mdi:volume-off" "switch.turn_off" "col" 107 107 }]}] %}''; 108 + # crossed out speaker when off, so on/off differ in shape too 108 109 routeCell = 109 110 r: 110 - ''{"type": "button", "entity": "switch.audio_route_" ~ k ~ "_${r}", "name": "${rooms.${r}}", "show_name": false, "icon": "mdi:speaker", "icon_height": "64px", "tap_action": {"action": "toggle"}, "hold_action": {"action": "none"}}''; 111 + let 112 + id = ''"switch.audio_route_" ~ k ~ "_${r}"''; 113 + in 114 + ''{"type": "button", "entity": ${id}, "name": "${rooms.${r}}", "show_name": false, "icon": ("mdi:speaker" if is_state(${id}, "on") else "mdi:speaker-off"), "icon_height": "64px", "tap_action": {"action": "toggle"}, "hold_action": {"action": "none"}}''; 111 115 matrix = lib.concatStrings ( 112 116 [ 113 117 "{% set ns = namespace(out=[]) %}"