Configuración Inicial
This commit is contained in:
76
packages/citroen.yaml
Normal file
76
packages/citroen.yaml
Normal file
@@ -0,0 +1,76 @@
|
||||
sensor:
|
||||
|
||||
- platform: command_line
|
||||
command: !secret citroen_status
|
||||
name: citroen_status
|
||||
json_attributes:
|
||||
- signals
|
||||
- location
|
||||
- updatedAt
|
||||
value_template: ''
|
||||
scan_interval: 300
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
citroen_bateria:
|
||||
friendly_name: 'Citroen Batería'
|
||||
value_template: >-
|
||||
{% for signals in states.sensor.citroen_status.attributes.signals -%}
|
||||
{% if signals.name == "BatteryVoltage" %}
|
||||
{{ signals.value }}
|
||||
{% endif %}
|
||||
{%- endfor -%}
|
||||
unit_of_measurement: 'V'
|
||||
citroen_velocidad:
|
||||
friendly_name: 'Citroen Velocidad'
|
||||
value_template: >-
|
||||
{% for signals in states.sensor.citroen_status.attributes.signals -%}
|
||||
{% if signals.name == "GpsSpeed" %}
|
||||
{{ signals.value }}
|
||||
{% endif %}
|
||||
{%- endfor -%}
|
||||
unit_of_measurement: 'Km/h'
|
||||
citroen_combustible:
|
||||
friendly_name: 'Citroen Gasolina'
|
||||
value_template: >-
|
||||
{% for signals in states.sensor.citroen_status.attributes.signals -%}
|
||||
{% if signals.name == "FuelLevel" %}
|
||||
{{ signals.value }}
|
||||
{% endif %}
|
||||
{%- endfor -%}
|
||||
unit_of_measurement: 'L'
|
||||
citroen_kilometros:
|
||||
friendly_name: 'Citroen Total Km'
|
||||
value_template: >-
|
||||
{% for signals in states.sensor.citroen_status.attributes.signals -%}
|
||||
{% if signals.name == "Odometer" %}
|
||||
{{ signals.value }}
|
||||
{% endif %}
|
||||
{%- endfor -%}
|
||||
unit_of_measurement: 'km'
|
||||
citroen_revoluciones:
|
||||
friendly_name: 'Citroen Revoluciones por Minuto'
|
||||
value_template: >-
|
||||
{% for signals in states.sensor.citroen_status.attributes.signals -%}
|
||||
{% if signals.name == "EngineSpeed" %}
|
||||
{{ signals.value }}
|
||||
{% endif %}
|
||||
{%- endfor -%}
|
||||
unit_of_measurement: 'tr/min'
|
||||
citroen_fecha_update:
|
||||
friendly_name: 'Citroen Actualización'
|
||||
value_template: "{{ as_timestamp(states.sensor.citroen_status.attributes.updatedAt) | timestamp_custom('%D %-I:%M %P') }}"
|
||||
citroen_latitud:
|
||||
friendly_name: 'Citroen Latitud'
|
||||
value_template: '{{ states.sensor.citroen_status.attributes.location.latitude }}'
|
||||
citroen_longitud:
|
||||
friendly_name: 'Citroen Longitud'
|
||||
value_template: '{{ states.sensor.citroen_status.attributes.location.longitude }}'
|
||||
|
||||
camera:
|
||||
name: Posición Citroen
|
||||
platform: generic
|
||||
still_image_url: !secret camara_citroen
|
||||
limit_refetch_to_url_change: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user