-
I previously used a modified version of SimowN's set-up to write the solar production and surplus to the heat pump (Navigator 2.0). Last week I installed the HACS implementation, but I have not been able to get this to write the values to the heat pump. Values are being read. My config.yaml looks as follows: # Loads default set of integrations. Do not remove.
default_config:
# Text to speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
template:
- sensor:
- name: "PV aktuelle Produktion"
unique_id: "power_solar_production"
unit_of_measurement: "kW"
state: >
{% if has_value('sensor.myenergi_harvi_10338601_power_ct_generation') == False %}
{{ 0.0 }}
{% else %}
{{ (states('sensor.myenergi_harvi_10338601_power_ct_generation')|float / 1000|float ) }}
{% endif %}
state_class: measurement
device_class: power
icon: mdi:solar-power
- name: "WP aktueller PV Überschuss"
unique_id: "power_solar_surplus"
unit_of_measurement: "kW"
state: >
{% if has_value('sensor.myenergi_harvi_10338601_power_ct_generation') == False or has_value('sensor.p1_net_electricity_point') == False %}
{{ 0.0 }}
{% elif states('sensor.p1_net_electricity_point')|float > 0 %}
{{ 0.0 }}
{% else %}
{{ (states('sensor.p1_net_electricity_point')|float / -1000|float ) }}
{% endif %}
state_class: measurement
device_class: power
icon: mdi:solar-power and the script as follows: idm_update_pv_values:
alias: Update Photovoltaik values to IDM Headpump
sequence:
- service: idm_heatpump.set_power
data:
target: sensor.idm_heat_pump_aktueller_pv_uberschuss
value: >
{{ states("sensor.power_solar_surplus") }}
- service: idm_heatpump.set_power
data:
target: sensor.idm_heat_pump_aktueller_pv_produktion
value: >
{{ states("sensor.power_solar_production") }}
mode: single Is there any additional configuration action that needs to be taken to be able to write the values? Any help would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I think you need to use FYI: To get proper formatting for the config you should use [normal text]
```yaml
[CONFIG GOES HERE]
```
[more text] because this |
Beta Was this translation helpful? Give feedback.
Not sure, what you wanted to achieve with the condition. I'm not a heavy user of the templating in Home Assistant, so I may be wrong here, but:
is_state(A, B)
seems to check whether the state of sensorA
is the valueB
. So in your case it compares against the literal valuesensor.idm_heat_pump_aktueller_pv_uberschuss
. I don't think that is what you wanted.If this is just an attempt at limiting the number of values sent to the heat pump, then I don't think that's necessary. The "PV-Überschuss" value isn't stored persistently, so AFAIK there is no limit on how often you can write it.
If you still want the condition, using the Automation UI I get (
states
in the second argument makes Home As…