Reestructuración coches (Xee)
Citroen & Smart
This commit is contained in:
14
packages/sensor/xee.yaml
Normal file
14
packages/sensor/xee.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
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 -%}
|
||||
Reference in New Issue
Block a user