Code Monkey home page Code Monkey logo

homeassistant-sermatec-inverter's People

Contributors

andreondra avatar mathieupotier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

homeassistant-sermatec-inverter's Issues

Add internationalization support for sensor names

Sensor names should be loaded from translation json files - now they are hard-coded and users have to rename the sensors manually, which I found very annoying :D. This issue consists of three tasks:

  • Rewrite the sensor.py to load sensor names from the translations.
  • Add sensor names to the en.json.
  • Add sensor names to the fr.json.

This should help: hass docs

inversion on discharging and charging battery power

Hi there,

Battery is showing discharging power value instead of charging power value :
image

Formula for power in Direct Current context : P(Watts) = I(Ampers) * U(Volts)

Negative Watt value mean battery is charging
Positive Watt value mean battery is discharging.

Regards

The problem of unavailability of sensors and meters

After updating Home Assistant Core to version 2023.5.2, there is an issue with the meters and the Riemann Integral Sum Sensor integration that retrieve states from the Sermatec integration. It seems that with zero input state, the meters and sensors are always unavailable at some time. I don't know if this is a bug in Home Assistant, or if the latest modification to the Sermatec integration may somehow be causing this. If I downgrade Home Assistant Core to version 2023.4.6, everything is fine. Can you please take a look at this? Thank you. I am attaching the log.

Logger: homeassistant.helpers.template_entity
Source: helpers/template_entity.py:344
First occurred: 08:43:42 (6 occurrences)
Last logged: 08:49:34

TemplateError('ValueError: Template error: round got invalid input 'unavailable' when rendering template '{{ (states('sensor.solar_inverter_battery_charging_power') | round(0)) - (states('sensor.solar_inverter_battery_discharging_power') | round(0)) }}' but no default was specified') while processing template 'Template<template=({{ (states('sensor.solar_inverter_battery_charging_power') | round(0)) - (states('sensor.solar_inverter_battery_discharging_power') | round(0)) }}) renders=34>' for attribute '_attr_native_value' in entity 'sensor.battery_power'
TemplateError('ValueError: Template error: round got invalid input 'unavailable' when rendering template '{{ (states('sensor.solar_inverter_grid_import') | round(0)) + (states('sensor.solar_inverter_battery_discharging_power') | round(0)) + (states('sensor.solar_inverter_pv_total_power') | round(0)) - (states('sensor.solar_inverter_battery_charging_power') | round(0)) - (states('sensor.solar_inverter_grid_export') | round(0)) }}' but no default was specified') while processing template 'Template<template=({{ (states('sensor.solar_inverter_grid_import') | round(0)) + (states('sensor.solar_inverter_battery_discharging_power') | round(0)) + (states('sensor.solar_inverter_pv_total_power') | round(0)) - (states('sensor.solar_inverter_battery_charging_power') | round(0)) - (states('sensor.solar_inverter_grid_export') | round(0)) }}) renders=270>' for attribute '_attr_native_value' in entity 'sensor.okamzita_spotreba_domu'
TemplateError('ValueError: Template error: round got invalid input 'unavailable' when rendering template '{{ (states('sensor.solar_inverter_battery_charging_power') | round(0)) - (states('sensor.solar_inverter_battery_discharging_power') | round(0)) }}' but no default was specified') while processing template 'Template<template=({{ (states('sensor.solar_inverter_battery_charging_power') | round(0)) - (states('sensor.solar_inverter_battery_discharging_power') | round(0)) }}) renders=58>' for attribute '_attr_native_value' in entity 'sensor.battery_power'
TemplateError('ValueError: Template error: round got invalid input 'unavailable' when rendering template '{{ (states('sensor.solar_inverter_grid_import') | round(0)) + (states('sensor.solar_inverter_battery_discharging_power') | round(0)) + (states('sensor.solar_inverter_pv_total_power') | round(0)) - (states('sensor.solar_inverter_battery_charging_power') | round(0)) - (states('sensor.solar_inverter_grid_export') | round(0)) }}' but no default was specified') while processing template 'Template<template=({{ (states('sensor.solar_inverter_grid_import') | round(0)) + (states('sensor.solar_inverter_battery_discharging_power') | round(0)) + (states('sensor.solar_inverter_pv_total_power') | round(0)) - (states('sensor.solar_inverter_battery_charging_power') | round(0)) - (states('sensor.solar_inverter_grid_export') | round(0)) }}) renders=320>' for attribute '_attr_native_value' in entity 'sensor.okamzita_spotreba_domu'
TemplateError('ValueError: Template error: round got invalid input 'unavailable' when rendering template '{{ (states('sensor.solar_inverter_battery_charging_power') | round(0)) - (states('sensor.solar_inverter_battery_discharging_power') | round(0)) }}' but no default was specified') while processing template 'Template<template=({{ (states('sensor.solar_inverter_battery_charging_power') | round(0)) - (states('sensor.solar_inverter_battery_discharging_power') | round(0)) }}) renders=72>' for attribute '_attr_native_value' in entity 'sensor.battery_power'

solar_inverter_battery_temperature wrong unit

In the newest version the Home Assistant reports:

Entity sensor.solar_inverter_battery_temperature (<class 'custom_components.sermatec_inverter.sensor.SermatecSensor'>) is using native unit of measurement 'หšC' which is not a valid unit for the device class ('temperature') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

Add links / submodule to Sermatec script repo.

sermatec.py should be included as a submodule in this repo or there should be links in the README.md at least.

Edit: Or, ideally, the sermatec comm script should be loaded as a separate PyPI module.

Have last inverter contact date and time

Hi,

Sometimes the inverter doesn't answer anymore, I propose to add a date time updated when we successfully have the inverter responding. Allowing us to detect when we're having trouble and then reload the integration and have data back again.

Add fault tolerance

Do not report Unavailable if other values could be retrieved. Now the integration gives up on every failure and waits for the next refresh. This should not happen.

This typically happens when there is more than one connection to the UART-TCP module (e.g. simultaneous connection from the official app).

Fix stuck values

Sometimes the integration would just stop updating the data and show only the last value (not Unavailable, which means the integration got stuck somehow).

Login in..

Hi,
I've used your way to integrate Sermatec. I can see Sermatec Inverter in possible integrations in HA, but when I choose it, I am stucked now here. What should be filled in?
PrintScreen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.