AutomationDataset/knevitzmello/automation-descriptions.json

15 lines
1.8 KiB
JSON

[
{
"id": "Controlar Luz pelo Webhook 2",
"result": {
"structured": "TRIGGER: When a webhook with ID 'controlar_luz' is received via POST or PUT method, and is local only. CONDITIONS: None. ACTIONS: Set variables: area_map mapping area names to light entities and brightness support, area from trigger JSON, estado (state) from trigger JSON (lowercased), intensidade (intensity) from trigger JSON (default 100). Then, choose: IF (area exists in area_map AND area_map[area].suporta_intensidade is true AND estado is 'dim') THEN call light.turn_on on entity area_map[area].entity_id with brightness_pct set to intensidade. ELSE IF (area exists in area_map AND estado is 'on' OR 'off') THEN call light.turn_on or light.turn_off on entity area_map[area].entity_id based on estado.",
"natural_language": {
"trigger": "When a local webhook request with the ID 'controlar_luz' is received, using either the POST or PUT HTTP method.",
"conditions": "There are no conditions that must be met for the automation to proceed.",
"action": "The automation first sets up a mapping of room areas to their corresponding light entities and whether they support brightness control. It extracts the target area, desired state (on, off, or dim), and brightness intensity from the incoming webhook data. If the specified area is valid, supports brightness, and the requested state is 'dim', it turns on the corresponding light and sets its brightness to the specified percentage. If the area is valid and the requested state is simply 'on' or 'off', it turns the corresponding light on or off accordingly."
},
"human_like": "Controls specific lights via a webhook, allowing them to be turned on, off, or dimmed to a set brightness.",
"complexity": "medium"
}
}
]