Egyras / HeishaMon

Panasonic Aquarea air-water H, J, K and L series protocol decrypt
240 stars 122 forks source link

Home Assistant integration outdated #226

Closed DamianBroj closed 2 months ago

DamianBroj commented 3 years ago

Hi, there was many things added to heishamon recently and the Home Assistant integration is still not updated (last update from 2020). Is it possible to add all the missing data and functionalities there?

geduxas commented 3 years ago

Hi, what features are you missing?

johansmitsnl commented 3 years ago

I'm getting these errors:

2021-10-19 15:44:43 ERROR (MainThread) [homeassistant.components.automation.set_heatshift_selector] Set heatshift selector: Error executing script. Invalid data for call_service at pos 1: Invalid value for input_number.heishamon_heatshift: 20.0 (range -5.0 - 5.0)
2021-10-19 15:44:43 ERROR (MainThread) [homeassistant.components.automation.set_heatshift_selector] Error while executing automation automation.set_heatshift_selector: Invalid value for input_number.heishamon_heatshift: 20.0 (range -5.0 - 5.0)

and

2021-10-13 16:23:56 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'unknown' when rendering template '{%- if states('sensor.heishamon_w_production') != "Unknown" -%}
  {%- if states('sensor.heishamon_w_consumption') > "0" -%}
    {{ '%0.1f' % ((states('sensor.heishamon_w_production') | float ) / (states('sensor.heishamon_w_consumption') | float)) }}
  {%- else -%}
    0.0
  {%- endif -%}
{%- else -%}
  n/a
{%- endif -%}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2021.12
2021-10-13 16:23:56 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'unknown' when rendering template '{%- if states('sensor.heishamon_w_production') != "Unknown" -%}
  {%- if states('sensor.heishamon_w_consumption') > "0" -%}
    {{ '%0.1f' % ((states('sensor.heishamon_w_production') | float ) / (states('sensor.heishamon_w_consumption') | float)) }}
  {%- else -%}
    0.0
  {%- endif -%}
{%- else -%}
  n/a
{%- endif -%}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2021.12
2021-10-13 16:23:56 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ZeroDivisionError: division by zero') while processing template 'Template("{%- if states('sensor.heishamon_w_production') != "Unknown" -%}
  {%- if states('sensor.heishamon_w_consumption') > "0" -%}
    {{ '%0.1f' % ((states('sensor.heishamon_w_production') | float ) / (states('sensor.heishamon_w_consumption') | float)) }}
  {%- else -%}
    0.0
  {%- endif -%}
{%- else -%}
  n/a
{%- endif -%}")' for attribute '_attr_native_value' in entity 'sensor.heishamon_cop'
DamianBroj commented 3 years ago

Hi, what features are you missing?

There are many topics that are not available in the current version of HA integration. On top of that there is a lack of condition for changing the heat shift max and min when the heating is changed between curve (then applicable should be +/-5) and direct heating (then it should be the currently available setting)

DamianBroj commented 3 years ago

I'm getting these errors:

2021-10-19 15:44:43 ERROR (MainThread) [homeassistant.components.automation.set_heatshift_selector] Set heatshift selector: Error executing script. Invalid data for call_service at pos 1: Invalid value for input_number.heishamon_heatshift: 20.0 (range -5.0 - 5.0)
2021-10-19 15:44:43 ERROR (MainThread) [homeassistant.components.automation.set_heatshift_selector] Error while executing automation automation.set_heatshift_selector: Invalid value for input_number.heishamon_heatshift: 20.0 (range -5.0 - 5.0)

and

2021-10-13 16:23:56 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'unknown' when rendering template '{%- if states('sensor.heishamon_w_production') != "Unknown" -%}
  {%- if states('sensor.heishamon_w_consumption') > "0" -%}
    {{ '%0.1f' % ((states('sensor.heishamon_w_production') | float ) / (states('sensor.heishamon_w_consumption') | float)) }}
  {%- else -%}
    0.0
  {%- endif -%}
{%- else -%}
  n/a
{%- endif -%}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2021.12
2021-10-13 16:23:56 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'unknown' when rendering template '{%- if states('sensor.heishamon_w_production') != "Unknown" -%}
  {%- if states('sensor.heishamon_w_consumption') > "0" -%}
    {{ '%0.1f' % ((states('sensor.heishamon_w_production') | float ) / (states('sensor.heishamon_w_consumption') | float)) }}
  {%- else -%}
    0.0
  {%- endif -%}
{%- else -%}
  n/a
{%- endif -%}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2021.12
2021-10-13 16:23:56 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ZeroDivisionError: division by zero') while processing template 'Template("{%- if states('sensor.heishamon_w_production') != "Unknown" -%}
  {%- if states('sensor.heishamon_w_consumption') > "0" -%}
    {{ '%0.1f' % ((states('sensor.heishamon_w_production') | float ) / (states('sensor.heishamon_w_consumption') | float)) }}
  {%- else -%}
    0.0
  {%- endif -%}
{%- else -%}
  n/a
{%- endif -%}")' for attribute '_attr_native_value' in entity 'sensor.heishamon_cop'

First part for sure is related with setting direct temp vs curve and the acceptable values by heat pump in certain modes, as mentioned in the second part of my previous reply

PGnl commented 3 years ago

I use both direct as well as shift mode (dual zone set-up) Currently having Domoticz side-by-side of HA (seeing if I want to go for HA or not)

I changed following for direct in the yaml:

Line 143 (in my yaml):

`

Sets heatshift Z1 temperature to the selected value

and line 199 (in my yaml):

heishamon_heatshift_1: name: Set Z1 Temperature min: 0 max: 30 step: 1

and then for TOP27:

`

TOP27 - Heatrequest Temperature

Then direct should work (seems to work for me).

Not the cleanest way, but the quickest way for me to get it working for now. Would prefer a options menu in the top where you would be able to choose direct or curve, but time is limited. Same goes for single and dual zone, but just added the topics for it (copy paste of existing topics)

johansmitsnl commented 2 years ago

Isn't it that the value when running in room temperature mode that the value is not a difference but the desired/set room temperature?