15 lines
392 B
YAML
15 lines
392 B
YAML
sensor:
|
|
- platform: command_line
|
|
command: !secret refresh_xee_command
|
|
name: refresh_xee
|
|
scan_interval: 86400
|
|
json_attributes:
|
|
- access_token
|
|
- expires_in
|
|
value_template: >-
|
|
{% if value_json.access_token is defined -%}
|
|
Válida hasta: {{ (as_timestamp(now()) + value_json.expires_in) | timestamp_local }}
|
|
{%- else -%}
|
|
Caducada.
|
|
{%- endif -%}
|