Yaml script in HA but no activation
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 8/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- yaml
- Lĩnh vực
- tooling
Hướng nghiên cứu
The issue provides no Yamlscript file, test, or project entry point to inspect; it instead includes a large Home Assistant YAML configuration and reports that its automations do not activate. Start by confirming that the configuration belongs in this repository and identifying a minimal reproducible case. Done would require a clearly scoped failure and a project-specific test or verification path.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hello everyone,
I’m Peter from the Netherlands. Like many others, I’m trying to control all the major energy consumers in our house—especially heating—so I can activate them when energy prices are lowest or when solar power is available. To start, I’m focusing on controlling the electric heating in our garage.
Since I’m not a programmer, I asked ChatGPT and Mistral to help me create a script. While it looks good, it doesn’t work as intended. First, the heating doesn’t start automatically. And when I turn it on manually, it doesn’t turn off automatically either.
I’ve checked all the sensors, and they’re working correctly. I apologize for the YAML code containing many symbols; I added them to make it more readable for myself.
Project Overview:
I have a Shelly 1 Mini connected to the plus and minus terminals of the normal thermostat input on the electric heater. The Shelly 1 Mini is controlled by Home Assistant (HA) using the script below.
The heating can activate in two ways:
Solar power mode: It turns on when net solar output exceeds 2000 watts and turns off when it drops below 400 watts.
Winter mode: If the remote thermostat drops below 10°C, the heating starts during the cheapest hourly energy prices of the day and turns off once 11°C is reached.
I also have an override switch to turn the heating on immediately and a season switch to disable heating in summer.
Errors:
The following lines in the script generate a PatternWarning:
service: switch.turn_on
service: switch.turn_off
platform: numeric_state
platform: state
These are the only errors I can see in the Home Assistant Code Studio.
Troubleshooting Steps:
Initially, Home Assistant showed the garage heating status as "waiting on temperature." I asked Mistral (Euro Chat GTP) to fix the issue, and it made some changes to the script. However, it feels like relying on AI to get this right is a dead end. Maybe I’m not asking the right questions or providing the right input, but I hope someone here can spot why the script isn’t working.
(Note: Most of the additional text in the script is in Dutch.)
############################################
🔥 GARAGE VERWARMING SLIM PAKKET (GEOPTIMALISEERD)
############################################
############################
⚙️ HELPERS (Dashboard)
############################
input_boolean:
garage_verwarming_seizoen:
name: "Verwarming Garage Seizoen"
icon: mdi:radiator
garage_override:
name: "Garage Verwarming Override"
icon: mdi:hand-back-right
############################
📊 TEMPLATE SENSORS & BINARY SENSORS
############################
template:
-
sensor:
⚡ Netto vermogen (P1 omgedraaid)
- name: "Netto Vermogen"
unit_of_measurement: "W"
state: >
{% if states('sensor.p1_meter_power') not in ['unavailable', 'unknown'] %}
{{ states('sensor.p1_meter_power') | float * -1 }}
{% else %}
0
{% endif %}
📊 Garage Verwarming Status
- name: "Garage Verwarming Status"
state: >
{% if is_state('input_boolean.garage_override', 'on') %}
Override actief
{% elif is_state('switch.verwarming_garage', 'on') %}
Verwarmen actief
{% elif is_state('binary_sensor.pv_overschot_hysterese', 'on') and states('sensor.wifi_temperature_garage_temperatuur') | float < 15 %}
Wacht op PV-overschot
{% else %}
Uit
{% endif %}
- name: "Netto Vermogen"
-
binary_sensor:
☀️ PV overschot hysterese + filtering
- name: "PV overschot hysterese"
state: >
{% set current_power = states('sensor.netto_vermogen') | float(0) %}
{% set was_on = is_state('binary_sensor.pv_overschot_hysterese', 'on') %}
{{ current_power > 2000 or (was_on and current_power > 400) }}
💶 Stroom goedkoop (onder daggemiddelde)
- name: "Stroom goedkoop"
state: >
{% if states('sensor.nordpool_energyprices') not in ['unavailable', 'unknown'] %}
{{ states('sensor.nordpool_energyprices') | float <
state_attr('sensor.nordpool_energyprices', 'average') | float(0) }}
{% else %}
false
{% endif %}
- name: "PV overschot hysterese"
############################
📊 STATISTICS (PIEKFILTER)
############################
sensor:
- platform: statistics
name: "Netto Vermogen 2min Gemiddeld"
entity_id: sensor.netto_vermogen
state_characteristic: mean
max_age:
minutes: 2
############################
🔥 HOOFD AUTOMATION
############################
automation:
-
alias: "Garage verwarming slim totaal"
mode: restarttrigger:
- platform: state
entity_id:- sensor.wifi_temperature_garage_temperatuur
- sensor.netto_vermogen_2min_gemiddeld
- binary_sensor.pv_overschot_hysterese
- input_boolean.garage_verwarming_seizoen
- input_boolean.garage_override
condition:
- condition: state
entity_id: input_boolean.garage_verwarming_seizoen
state: "on"
action:
-
choose:
##################################🟢 HANDMATIGE OVERRIDE
##################################
- conditions:
- condition: state
entity_id: input_boolean.garage_override
state: "on"
sequence: - service: switch.turn_on
target:
entity_id: switch.verwarming_garage
- condition: state
##################################
☀️ PV VERWARMEN
##################################
- conditions:
- condition: and
conditions:- condition: state
entity_id: binary_sensor.pv_overschot_hysterese
state: "on" - condition: numeric_state
entity_id: sensor.wifi_temperature_garage_temperatuur
below: 15 - condition: state
entity_id: switch.verwarming_garage
state: "off"
sequence:
- condition: state
- delay: "00:00:10"
- service: switch.turn_on
target:
entity_id: switch.verwarming_garage
- condition: and
##################################
❄️ VORST + GOEDKOOPSTE UREN
##################################
- conditions:
- condition: and
conditions:- condition: numeric_state
entity_id: sensor.wifi_temperature_garage_temperatuur
below: 10 - condition: state
entity_id: binary_sensor.stroom_goedkoop
state: "on" - condition: state
entity_id: switch.verwarming_garage
state: "off"
sequence:
- condition: numeric_state
- delay: "00:02:00"
- service: switch.turn_on
target:
entity_id: switch.verwarming_garage
- condition: and
##################################
🔴 UIT LOGICA
##################################
- conditions:
- condition: or
conditions:- condition: state
entity_id: binary_sensor.pv_overschot_hysterese
state: "off" - condition: numeric_state
entity_id: sensor.wifi_temperature_garage_temperatuur
above: 14.9
sequence:
- condition: state
- condition: state
entity_id: switch.verwarming_garage
state: "on" - delay: "00:05:00"
- service: switch.turn_off
target:
entity_id: switch.verwarming_garage
- condition: or
- conditions:
- platform: state
-
alias: "Garage verwarming uitschakelen bij laag vermogen"
trigger:- platform: numeric_state
entity_id: sensor.netto_vermogen
below: 800
condition: - condition: state
entity_id: switch.verwarming_garage
state: "on"
action: - delay: "00:05:00"
- service: switch.turn_off
target:
entity_id: switch.verwarming_garage
- platform: numeric_state
It would help me a lot if this one was working so I can use this at a base line of the heating in our house and the warm water supply.
Thank you in advance!
Greetings Peter
- Ngôn ngữ chính
- Clojure
- Star
- 647
- Fork
- 62
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của yaml/yamlscript
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
yaml/yamlscript#273 ·
-
Blog post "YAML best practices": Whitespaces after colon `:` and before hashtag `#` are not renderedĐang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
yaml/yamlscript#266 · 1 bình luận ·
-
Make Java library more idiomaticĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
yaml/yamlscript#272 ·
-
Building documentationĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
yaml/yamlscript#264 · 1 bình luận ·
-
Broken pod for perl modulesĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
yaml/yamlscript#217 ·
Tất cả issue của yaml/yamlscript
Issue tương tự
-
worker/start rejects middleware supplied as a VarCó thể đã có người làm @rajp152k đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Profiler (Remotery) leaks a socket for every connection that fails the WebSocket handshakeCó thể đã có người làm @rthery đã nhận 1 ngày trước. Đang mởtriage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
IOP nitrate needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
category:tooling
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày