HeishaMon icon indicating copy to clipboard operation
HeishaMon copied to clipboard

Home Assistant integration outdated

Open DamianBroj opened this issue 4 years ago • 6 comments

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?

DamianBroj avatar Oct 09 '21 19:10 DamianBroj

Hi, what features are you missing?

geduxas avatar Oct 18 '21 12:10 geduxas

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'

johansmitsnl avatar Oct 19 '21 15:10 johansmitsnl

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 avatar Oct 21 '21 19:10 DamianBroj

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

DamianBroj avatar Oct 21 '21 19:10 DamianBroj

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

  • alias: Set Z1 temp trigger: platform: state entity_id: input_number.heishamon_heatshift_1 action: service: mqtt.publish data_template: topic: panasonic_heat_pump/commands/SetZ1HeatRequestTemperature retain: false #IMPORTANT! ALWAYS set retain flag false for commands! payload_template: >- {{ "%.0f" % (states('input_number.heishamon_heatshift_1') | int) }} `

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

  • platform: mqtt name: Aquarea Z1 Heat Request Temperature state_topic: "panasonic_heat_pump/main/Z1_Heat_Request_Temp" unit_of_measurement: '°C' `

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)

PGnl avatar Oct 22 '21 10:10 PGnl

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?

johansmitsnl avatar Dec 17 '21 19:12 johansmitsnl