Compare commits

...

2 Commits

9 changed files with 50 additions and 13 deletions
-6
View File
@@ -77,12 +77,6 @@ python_script:
frontend:
themes: !include_dir_merge_named include/themes/
logger:
default: warning
logs:
custom_components.affalddk: debug
pyaffalddk: debug
##################################################
# Integrations
##################################################
+3 -2
View File
@@ -2,8 +2,9 @@
trigger:
platform: state
entity_id: binary_sensor.indkorsel_sensor_motion
to: 'on'
actions:
to: 'on' condition:
- condition: template
value_template: "{{ states('input_number.ai_gemini_calls_today') | int < 20 }}" actions:
- action: script.overvaagning
metadata: {}
data: {}
+9
View File
@@ -0,0 +1,9 @@
- alias: Reset AI Gemini Calls Daily
trigger:
platform: time
at: '00:00:00'
action:
- service: input_number.set_value
data:
entity_id: input_number.ai_gemini_calls_today
value: 0
@@ -0,0 +1,17 @@
- alias: Tesla failsafe charge
trigger:
- platform: template
value_template: >
{% set deadline_ts = as_timestamp(states('input_datetime.tesla_charge_deadline')) %}
{% set now_ts = as_timestamp(now()) %}
{{ (deadline_ts - now_ts) <= 3600 }} # 1 time = 3600 sekunder
condition:
- condition: numeric_state
entity_id: sensor.tesla_kwh_needed
above: 0
action:
- service: switch.turn_on
target:
entity_id: switch.home_charging
@@ -8,5 +8,4 @@
action:
- service: switch.turn_off
target:
entity_id: switch.home_charging
entity_id: switch.home_charging
+5
View File
@@ -0,0 +1,5 @@
tesla_charge_deadline:
name: Tesla charge deadline
has_date: true
has_time: true
+7
View File
@@ -0,0 +1,7 @@
ai_gemini_calls_today:
name: AI Gemini Calls Today
min: 0
max: 50
step: 1
mode: box
unit_of_measurement: calls
+6 -3
View File
@@ -43,11 +43,14 @@ overvaagning:
eller stationære objekter. Hvis der ikke er nogen synlig årsag til
bevægelsen, svar blot med 'Ingen åbenlys bevægelse detekteret.' Hold
beskeden kort og underholdende som en notifikation på Apple!
filenames:
images:
- /config/www/indkorsel_snapshot.jpg
response_variable: generated_content
action: google_generative_ai_conversation.generate_content
- if:
action: ai_task.generate_data
- service: input_number.set_value
data:
entity_id: input_number.ai_gemini_calls_today
value: "{{ states('input_number.ai_gemini_calls_today') | int + 1 }}"
- condition: template
value_template: "{{ 'No Obvious Motion Detected.' in generated_content.text }}"
then:
@@ -1,3 +1,5 @@
platform: template
sensors:
- name: tesla_charge_now
state: >
{% set deadline = states('input_datetime.tesla_charge_deadline') %}