Compare commits

..

2 Commits

Author SHA1 Message Date
claus 89b4724762 Clean up Tesla sensors and HomeKit filter 2026-04-06 16:20:52 +02:00
claus 61b60dd78b Fix Tesla log warnings 2026-04-06 16:00:06 +02:00
3 changed files with 6 additions and 61 deletions
+5
View File
@@ -70,6 +70,11 @@ python_script:
frontend: frontend:
themes: !include_dir_merge_named include/themes/ themes: !include_dir_merge_named include/themes/
homekit:
filter:
exclude_entity_globs:
- light.browser_mod_*_screen
################################################## ##################################################
# Integrations # Integrations
################################################## ##################################################
@@ -16,7 +16,7 @@
{{ deadline not in ['unknown','unavailable',''] and as_timestamp(deadline) > as_timestamp(now()) }} {{ deadline not in ['unknown','unavailable',''] and as_timestamp(deadline) > as_timestamp(now()) }}
- condition: state - condition: state
entity_id: binary_sensor.tesla_connected entity_id: binary_sensor.snowywhite_charger
state: "on" state: "on"
action: action:
-60
View File
@@ -1,60 +0,0 @@
# Konverterer batteri til float
- platform: template
sensors:
snowywhite_battery_numeric:
friendly_name: "Batteri (%)"
unit_of_measurement: "%"
value_template: >
{% set val = states('sensor.snowywhite_battery') %}
{% if val not in ['unknown','unavailable',''] %}
{{ val.replace('%','') | float }}
{% else %}
0
{% endif %}
# Konverterer range til float
snowywhite_range_numeric:
friendly_name: "Rækkevidde (km)"
unit_of_measurement: "km"
value_template: >
{% set val = states('sensor.snowywhite_range') %}
{% if val not in ['unknown','unavailable',''] %}
{{ val.replace(' km','') | float }}
{% else %}
0
{% endif %}
# include/sensors/tesla_timeline_numeric.yaml
- platform: template
sensors:
snowywhite_charging_numeric:
friendly_name: "Charging (numeric)"
unit_of_measurement: "1"
value_template: >
{% if is_state('binary_sensor.snowywhite_charging','on') %}
1
{% else %}
0
{% endif %}
# Dette sikrer altid numeric (0 eller 1)
snowywhite_energy_added_numeric:
friendly_name: "Energy Added (kWh)"
unit_of_measurement: "kWh"
value_template: >
{% set val = states('sensor.snowywhite_energy_added') %}
{% if val not in ['unknown','unavailable',''] %}
{{ val | float }}
{% else %}
0
{% endif %}
snowywhite_charging_rate_numeric:
friendly_name: "Charging Rate (km/h)"
unit_of_measurement: "km/h"
value_template: >
{% set val = states('sensor.snowywhite_charging_rate') %}
{% if val not in ['unknown','unavailable',''] %}
{{ val | float }}
{% else %}
0
{% endif %}