50 lines
1.9 KiB
YAML
50 lines
1.9 KiB
YAML
set:
|
|
description: Set attributes of a variable entity.
|
|
fields:
|
|
entity_id:
|
|
description: Entity id of the variable whose value will be set.
|
|
example: var.x
|
|
value:
|
|
description: The new value for the variable entity.
|
|
example: 13
|
|
value_template:
|
|
description: The new value template for the variable entity.
|
|
example: "{{ input_boolean.foo }}"
|
|
tracked_entity_id:
|
|
description: The new list of entities for the variable entity to track.
|
|
example: input_boolean.bar
|
|
tracked_event_type:
|
|
description: The new list of event types for the variable entity to track.
|
|
example: sunset
|
|
query:
|
|
description: An SQL QUERY string, should return 1 result at most.
|
|
example: "SELECT COUNT(*) AS todays_diaper_count FROM events WHERE event_type = 'diaper_event' AND time_fired BETWEEN DATETIME('now', 'start of day') and DATETIME('now');"
|
|
column:
|
|
description: The SQL COLUMN to select from the result of the SQL QUERY.
|
|
example: 'todays_diaper_count'
|
|
restore:
|
|
description: The new restore value for the variable entity.
|
|
example: false
|
|
force_update:
|
|
description: The new force_update value for the variable entity.
|
|
example: true
|
|
unit_of_measurement:
|
|
description: The new unit of measurement for the variable entity.
|
|
example: 'ounces'
|
|
icon:
|
|
description: The new icon for the variable entity.
|
|
example: 'mdi:baby-bottle-outline'
|
|
icon_template:
|
|
description: The new icon template for the variable entity.
|
|
entity_picture:
|
|
description: The new picture for the variable entity.
|
|
example: 'local/pic.png'
|
|
entity_picture_template:
|
|
description: The new picture template for the variable entity.
|
|
update:
|
|
description: Force a variable to update its state and atttributes.
|
|
fields:
|
|
entity_id:
|
|
description: Entity id of the variable that will be updated.
|
|
example: var.x
|