.ha_mcp/logs/mcp_usage.jsonl, .storage/lovelace.kobo_dashboard
This commit is contained in:
@@ -84,19 +84,19 @@
|
||||
},
|
||||
{
|
||||
"type": "custom:button-card",
|
||||
"entity": "light.night_light",
|
||||
"entity": "light.night_light_2",
|
||||
"name": "Night Light",
|
||||
"show_icon": false,
|
||||
"show_state": false,
|
||||
"show_label": true,
|
||||
"label": "[[[\n if (states['light.night_light'].state === 'off') return 'Off';\n const rgb = states['light.night_light'].attributes.rgb_color;\n if (!rgb) return states['light.night_light'].state;\n if (rgb[0] > rgb[1] && rgb[0] > rgb[2]) return 'Red';\n if (rgb[1] > rgb[0] && rgb[1] > rgb[2]) return 'Green';\n return 'Other Color';\n]]]\n",
|
||||
"label": "[[[\n if (states['light.night_light_2'].state === 'off') return 'Off';\n const rgb = states['light.night_light_2'].attributes.rgb_color;\n if (!rgb) return states['light.night_light_2'].state;\n if (rgb[0] > rgb[1] && rgb[0] > rgb[2]) return 'Red';\n if (rgb[1] > rgb[0] && rgb[1] > rgb[2]) return 'Green';\n return 'Other Color';\n]]]\n",
|
||||
"styles": {
|
||||
"label": [
|
||||
{
|
||||
"font-weight": "bold"
|
||||
},
|
||||
{
|
||||
"color": "[[[\n if (states['light.night_light'].state === 'off') return '#888888';\n const rgb = states['light.night_light'].attributes.rgb_color;\n if (!rgb) return 'var(--primary-text-color)';\n if (rgb[0] > rgb[1] && rgb[0] > rgb[2]) return '#ff4d4d';\n if (rgb[1] > rgb[0] && rgb[1] > rgb[2]) return '#4dff4d';\n return 'var(--primary-text-color)';\n]]]\n"
|
||||
"color": "[[[\n if (states['light.night_light_2'].state === 'off') return '#888888';\n const rgb = states['light.night_light_2'].attributes.rgb_color;\n if (!rgb) return 'var(--primary-text-color)';\n if (rgb[0] > rgb[1] && rgb[0] > rgb[2]) return '#ff4d4d';\n if (rgb[1] > rgb[0] && rgb[1] > rgb[2]) return '#4dff4d';\n return 'var(--primary-text-color)';\n]]]\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user