I think, I nailed it, it’s a bit crude -
I created another template that listens to the original COP sensor template,
If the new ‘cop_true’ template value is in between 0 and 8 that listens to the original COP sensor, log value, otherwise log 0 (no negative or uber efficiency values).
I hope this makes sense. Thoughts on my cowboy approach welcome
- name: "cop_true"
unique_id: "cop_true"
unit_of_measurement: 'COP'
state: >
{% set cop_true = (states('sensor.cop_power') | float ) | int %}
{% if cop_true >= 0.001 and cop_true <= 9 %}
{{ states('sensor.cop_power') }}
{% else %}
{{ 0 }}
{% endif %}
attributes:
minute_counter: "{{ now().minute }}"