Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 06ddb003a5 | |||
| 8fa4db9d89 |
@@ -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
|
||||
##################################################
|
||||
|
||||
@@ -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: {}
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1,5 @@
|
||||
tesla_charge_deadline:
|
||||
name: Tesla charge deadline
|
||||
has_date: true
|
||||
has_time: true
|
||||
|
||||
@@ -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
|
||||
@@ -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:
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
platform: template
|
||||
sensors:
|
||||
- name: tesla_charge_now
|
||||
state: >
|
||||
{% set deadline = states('input_datetime.tesla_charge_deadline') %}
|
||||
Reference in New Issue
Block a user