Skip to content

Instantly share code, notes, and snippets.

@Habbie
Created January 11, 2024 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Habbie/9dc838ffad4660f685003903147f7a01 to your computer and use it in GitHub Desktop.
Save Habbie/9dc838ffad4660f685003903147f7a01 to your computer and use it in GitHub Desktop.
{
"toggle": {
"description": "Toggles one or more lights, from on to off, or, off to on, based on their current state.",
"fields": {
"brightness": {
"advanced": true,
"description": "Number indicating brightness, where 0 turns the light off, 1 is the minimum brightness, and 255 is the maximum brightness.",
"filter": {
"attribute": {
"supported_color_modes": [
"brightness",
"color_temp",
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Brightness value",
"selector": {
"number": {
"max": 255,
"min": 0
}
}
},
"brightness_pct": {
"description": "Number indicating the percentage of full brightness, where 0 turns the light off, 1 is the minimum brightness, and 100 is the maximum brightness.",
"filter": {
"attribute": {
"supported_color_modes": [
"brightness",
"color_temp",
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Brightness",
"selector": {
"number": {
"max": 100,
"min": 0,
"unit_of_measurement": "%"
}
}
},
"color_name": {
"advanced": true,
"description": "A human-readable color name.",
"filter": {
"attribute": {
"supported_color_modes": [
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Color name",
"selector": {
"select": {
"options": [
"homeassistant",
"aliceblue",
"antiquewhite",
"aqua",
"aquamarine",
"azure",
"beige",
"bisque",
"blanchedalmond",
"blue",
"blueviolet",
"brown",
"burlywood",
"cadetblue",
"chartreuse",
"chocolate",
"coral",
"cornflowerblue",
"cornsilk",
"crimson",
"cyan",
"darkblue",
"darkcyan",
"darkgoldenrod",
"darkgray",
"darkgreen",
"darkgrey",
"darkkhaki",
"darkmagenta",
"darkolivegreen",
"darkorange",
"darkorchid",
"darkred",
"darksalmon",
"darkseagreen",
"darkslateblue",
"darkslategray",
"darkslategrey",
"darkturquoise",
"darkviolet",
"deeppink",
"deepskyblue",
"dimgray",
"dimgrey",
"dodgerblue",
"firebrick",
"floralwhite",
"forestgreen",
"fuchsia",
"gainsboro",
"ghostwhite",
"gold",
"goldenrod",
"gray",
"green",
"greenyellow",
"grey",
"honeydew",
"hotpink",
"indianred",
"indigo",
"ivory",
"khaki",
"lavender",
"lavenderblush",
"lawngreen",
"lemonchiffon",
"lightblue",
"lightcoral",
"lightcyan",
"lightgoldenrodyellow",
"lightgray",
"lightgreen",
"lightgrey",
"lightpink",
"lightsalmon",
"lightseagreen",
"lightskyblue",
"lightslategray",
"lightslategrey",
"lightsteelblue",
"lightyellow",
"lime",
"limegreen",
"linen",
"magenta",
"maroon",
"mediumaquamarine",
"mediumblue",
"mediumorchid",
"mediumpurple",
"mediumseagreen",
"mediumslateblue",
"mediumspringgreen",
"mediumturquoise",
"mediumvioletred",
"midnightblue",
"mintcream",
"mistyrose",
"moccasin",
"navajowhite",
"navy",
"navyblue",
"oldlace",
"olive",
"olivedrab",
"orange",
"orangered",
"orchid",
"palegoldenrod",
"palegreen",
"paleturquoise",
"palevioletred",
"papayawhip",
"peachpuff",
"peru",
"pink",
"plum",
"powderblue",
"purple",
"red",
"rosybrown",
"royalblue",
"saddlebrown",
"salmon",
"sandybrown",
"seagreen",
"seashell",
"sienna",
"silver",
"skyblue",
"slateblue",
"slategray",
"slategrey",
"snow",
"springgreen",
"steelblue",
"tan",
"teal",
"thistle",
"tomato",
"turquoise",
"violet",
"wheat",
"white",
"whitesmoke",
"yellow",
"yellowgreen"
],
"translation_key": "color_name"
}
}
},
"color_temp": {
"advanced": true,
"description": "Color temperature in mireds.",
"filter": {
"attribute": {
"supported_color_modes": [
"color_temp",
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Color temperature",
"selector": {
"color_temp": null
}
},
"effect": {
"description": "Light effect.",
"filter": {
"supported_features": [
4
]
},
"name": "Effect",
"selector": {
"text": null
}
},
"flash": {
"advanced": true,
"description": "Tell light to flash, can be either value short or long.",
"filter": {
"supported_features": [
8
]
},
"name": "Flash",
"selector": {
"select": {
"options": [
{
"label": "Long",
"value": "long"
},
{
"label": "Short",
"value": "short"
}
]
}
}
},
"hs_color": {
"advanced": true,
"description": "Color in hue/sat format. A list of two integers. Hue is 0-360 and Sat is 0-100.",
"example": "[300, 70]",
"filter": {
"attribute": {
"supported_color_modes": [
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Hue/Sat color",
"selector": {
"object": null
}
},
"kelvin": {
"advanced": true,
"description": "Color temperature in Kelvin.",
"filter": {
"attribute": {
"supported_color_modes": [
"color_temp",
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Color temperature",
"selector": {
"color_temp": {
"max": 6500,
"min": 2000,
"unit": "kelvin"
}
}
},
"profile": {
"advanced": true,
"description": "Name of a light profile to use.",
"example": "relax",
"name": "Profile",
"selector": {
"text": null
}
},
"rgb_color": {
"advanced": true,
"description": "The color in RGB format. A list of three integers between 0 and 255 representing the values of red, green, and blue.",
"example": "[255, 100, 100]",
"filter": {
"attribute": {
"supported_color_modes": [
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Color",
"selector": {
"color_rgb": null
}
},
"transition": {
"description": "Duration it takes to get to next state.",
"filter": {
"supported_features": [
32
]
},
"name": "Transition",
"selector": {
"number": {
"max": 300,
"min": 0,
"unit_of_measurement": "seconds"
}
}
},
"white": {
"advanced": true,
"description": "Set the light to white mode.",
"filter": {
"attribute": {
"supported_color_modes": [
"white"
]
}
},
"name": "White",
"selector": {
"constant": {
"label": "Enabled",
"value": true
}
}
},
"xy_color": {
"advanced": true,
"description": "Color in XY-format. A list of two decimal numbers between 0 and 1.",
"example": "[0.52, 0.43]",
"filter": {
"attribute": {
"supported_color_modes": [
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "XY-color",
"selector": {
"object": null
}
}
},
"name": "Toggle",
"target": {
"entity": [
{
"domain": [
"light"
]
}
]
}
},
"turn_off": {
"description": "Turn off one or more lights.",
"fields": {
"flash": {
"advanced": true,
"description": "Tell light to flash, can be either value short or long.",
"filter": {
"supported_features": [
8
]
},
"name": "Flash",
"selector": {
"select": {
"options": [
{
"label": "Long",
"value": "long"
},
{
"label": "Short",
"value": "short"
}
]
}
}
},
"transition": {
"description": "Duration it takes to get to next state.",
"filter": {
"supported_features": [
32
]
},
"name": "Transition",
"selector": {
"number": {
"max": 300,
"min": 0,
"unit_of_measurement": "seconds"
}
}
}
},
"name": "Turn off",
"target": {
"entity": [
{
"domain": [
"light"
]
}
]
}
},
"turn_on": {
"description": "Turn on one or more lights and adjust properties of the light, even when they are turned on already.",
"fields": {
"brightness": {
"advanced": true,
"description": "Number indicating brightness, where 0 turns the light off, 1 is the minimum brightness, and 255 is the maximum brightness.",
"filter": {
"attribute": {
"supported_color_modes": [
"brightness",
"color_temp",
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Brightness value",
"selector": {
"number": {
"max": 255,
"min": 0
}
}
},
"brightness_pct": {
"description": "Number indicating the percentage of full brightness, where 0 turns the light off, 1 is the minimum brightness, and 100 is the maximum brightness.",
"filter": {
"attribute": {
"supported_color_modes": [
"brightness",
"color_temp",
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Brightness",
"selector": {
"number": {
"max": 100,
"min": 0,
"unit_of_measurement": "%"
}
}
},
"brightness_step": {
"advanced": true,
"description": "Change brightness by an amount.",
"filter": {
"attribute": {
"supported_color_modes": [
"brightness",
"color_temp",
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Brightness step value",
"selector": {
"number": {
"max": 255,
"min": -225
}
}
},
"brightness_step_pct": {
"description": "Change brightness by a percentage.",
"filter": {
"attribute": {
"supported_color_modes": [
"brightness",
"color_temp",
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Brightness step",
"selector": {
"number": {
"max": 100,
"min": -100,
"unit_of_measurement": "%"
}
}
},
"color_name": {
"advanced": true,
"description": "A human-readable color name.",
"filter": {
"attribute": {
"supported_color_modes": [
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Color name",
"selector": {
"select": {
"options": [
"homeassistant",
"aliceblue",
"antiquewhite",
"aqua",
"aquamarine",
"azure",
"beige",
"bisque",
"blanchedalmond",
"blue",
"blueviolet",
"brown",
"burlywood",
"cadetblue",
"chartreuse",
"chocolate",
"coral",
"cornflowerblue",
"cornsilk",
"crimson",
"cyan",
"darkblue",
"darkcyan",
"darkgoldenrod",
"darkgray",
"darkgreen",
"darkgrey",
"darkkhaki",
"darkmagenta",
"darkolivegreen",
"darkorange",
"darkorchid",
"darkred",
"darksalmon",
"darkseagreen",
"darkslateblue",
"darkslategray",
"darkslategrey",
"darkturquoise",
"darkviolet",
"deeppink",
"deepskyblue",
"dimgray",
"dimgrey",
"dodgerblue",
"firebrick",
"floralwhite",
"forestgreen",
"fuchsia",
"gainsboro",
"ghostwhite",
"gold",
"goldenrod",
"gray",
"green",
"greenyellow",
"grey",
"honeydew",
"hotpink",
"indianred",
"indigo",
"ivory",
"khaki",
"lavender",
"lavenderblush",
"lawngreen",
"lemonchiffon",
"lightblue",
"lightcoral",
"lightcyan",
"lightgoldenrodyellow",
"lightgray",
"lightgreen",
"lightgrey",
"lightpink",
"lightsalmon",
"lightseagreen",
"lightskyblue",
"lightslategray",
"lightslategrey",
"lightsteelblue",
"lightyellow",
"lime",
"limegreen",
"linen",
"magenta",
"maroon",
"mediumaquamarine",
"mediumblue",
"mediumorchid",
"mediumpurple",
"mediumseagreen",
"mediumslateblue",
"mediumspringgreen",
"mediumturquoise",
"mediumvioletred",
"midnightblue",
"mintcream",
"mistyrose",
"moccasin",
"navajowhite",
"navy",
"navyblue",
"oldlace",
"olive",
"olivedrab",
"orange",
"orangered",
"orchid",
"palegoldenrod",
"palegreen",
"paleturquoise",
"palevioletred",
"papayawhip",
"peachpuff",
"peru",
"pink",
"plum",
"powderblue",
"purple",
"red",
"rosybrown",
"royalblue",
"saddlebrown",
"salmon",
"sandybrown",
"seagreen",
"seashell",
"sienna",
"silver",
"skyblue",
"slateblue",
"slategray",
"slategrey",
"snow",
"springgreen",
"steelblue",
"tan",
"teal",
"thistle",
"tomato",
"turquoise",
"violet",
"wheat",
"white",
"whitesmoke",
"yellow",
"yellowgreen"
],
"translation_key": "color_name"
}
}
},
"color_temp": {
"description": "Color temperature in mireds.",
"filter": {
"attribute": {
"supported_color_modes": [
"color_temp",
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Color temperature",
"selector": {
"color_temp": {
"max": 500,
"min": 153,
"unit": "mired"
}
}
},
"effect": {
"description": "Light effect.",
"filter": {
"supported_features": [
4
]
},
"name": "Effect",
"selector": {
"text": null
}
},
"flash": {
"advanced": true,
"description": "Tell light to flash, can be either value short or long.",
"filter": {
"supported_features": [
8
]
},
"name": "Flash",
"selector": {
"select": {
"options": [
{
"label": "Long",
"value": "long"
},
{
"label": "Short",
"value": "short"
}
]
}
}
},
"hs_color": {
"advanced": true,
"description": "Color in hue/sat format. A list of two integers. Hue is 0-360 and Sat is 0-100.",
"example": "[300, 70]",
"filter": {
"attribute": {
"supported_color_modes": [
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Hue/Sat color",
"selector": {
"object": null
}
},
"kelvin": {
"advanced": true,
"description": "Color temperature in Kelvin.",
"filter": {
"attribute": {
"supported_color_modes": [
"color_temp",
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Color temperature",
"selector": {
"color_temp": {
"max": 6500,
"min": 2000,
"unit": "kelvin"
}
}
},
"profile": {
"advanced": true,
"description": "Name of a light profile to use.",
"example": "relax",
"name": "Profile",
"selector": {
"text": null
}
},
"rgb_color": {
"description": "The color in RGB format. A list of three integers between 0 and 255 representing the values of red, green, and blue.",
"filter": {
"attribute": {
"supported_color_modes": [
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "Color",
"selector": {
"color_rgb": null
}
},
"rgbw_color": {
"advanced": true,
"description": "The color in RGBW format. A list of four integers between 0 and 255 representing the values of red, green, blue, and white.",
"example": "[255, 100, 100, 50]",
"filter": {
"attribute": {
"supported_color_modes": [
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "RGBW-color",
"selector": {
"object": null
}
},
"rgbww_color": {
"advanced": true,
"description": "The color in RGBWW format. A list of five integers between 0 and 255 representing the values of red, green, blue, cold white, and warm white.",
"example": "[255, 100, 100, 50, 70]",
"filter": {
"attribute": {
"supported_color_modes": [
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "RGBWW-color",
"selector": {
"object": null
}
},
"transition": {
"description": "Duration it takes to get to next state.",
"filter": {
"supported_features": [
32
]
},
"name": "Transition",
"selector": {
"number": {
"max": 300,
"min": 0,
"unit_of_measurement": "seconds"
}
}
},
"white": {
"advanced": true,
"description": "Set the light to white mode.",
"filter": {
"attribute": {
"supported_color_modes": [
"white"
]
}
},
"name": "White",
"selector": {
"constant": {
"label": "Enabled",
"value": true
}
}
},
"xy_color": {
"advanced": true,
"description": "Color in XY-format. A list of two decimal numbers between 0 and 1.",
"example": "[0.52, 0.43]",
"filter": {
"attribute": {
"supported_color_modes": [
"hs",
"xy",
"rgb",
"rgbw",
"rgbww"
]
}
},
"name": "XY-color",
"selector": {
"object": null
}
}
},
"name": "Turn on",
"target": {
"entity": [
{
"domain": [
"light"
]
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment