sla89 / hassio-kostal-piko

Home Assistant Kostal PIKO Inverter Integration
MIT License
12 stars 4 forks source link

config error #14

Closed ecktisch closed 9 months ago

ecktisch commented 9 months ago

I getting below error:

Logger: homeassistant.config Source: config.py:552 First occurred: 22:23:10 (1 occurrences) Last logged: 22:23:10

Invalid config for 'template' at configuration.yaml, line 50: 'platform' is an invalid option for 'template', check: sensor->0->platform Invalid config for 'template' at configuration.yaml, line 50: required key 'state' not provided Invalid config for 'template' at configuration.yaml, line 51: 'host' is an invalid option for 'template', check: sensor->0->host

sla89 commented 9 months ago

Hi, can you please post your configuration.yaml from line 45-55? The issue is at line 50. Please ensure no sensitive data are part of this lines when you post it.

ecktisch commented 9 months ago

Hi, can you please post your configuration.yaml from line 45-55? The issue is at line 50. Please ensure no sensitive data are part of this lines when you post it.

Hey, here is the screenshot: Screenshot 2023-12-23 103356

sla89 commented 9 months ago

Ahh I see, you have put that at the wrong location.

The configuration needs to be placed into the sensor config and not as you did into the templates config.

I dont know your complete config, but you have to put line 50-52 after the template section. Ensure there is no indentation and remove the - before the sensor keyword.

sensor:
  - platform: kostal_piko
    host: IP_OF_YOUR_INVERTER

Have you got another sensor section? If so you can just put the lines 51-52 to that section.

ecktisch commented 9 months ago

Ahh I see, you have put that at the wrong location.

The configuration needs to be placed into the sensor config and not as you did into the templates config.

I dont know your complete config, but you have to put line 50-52 after the template section. Ensure there is no indentation and remove the - before the sensor keyword.

sensor:
  - platform: kostal_piko
    host: IP_OF_YOUR_INVERTER

Have you got another sensor section? If so you can just put the lines 51-52 to that section.

You are totally right. It works now with your changes. Thank you!