Giter Club home page Giter Club logo

Comments (4)

nilrog avatar nilrog commented on August 21, 2024 2

To fix this mess we can do something like this, or just update it and let users on 2021.8 skip the update or fix the mess themselves :P

  1. Update this integration as you have prepared so that it supports HA 2021.9.x
  2. Document in the README how you can use the customize feature in HA to modify attributes for the required sensors so that it can still be used in 2021.8.x for users that does not upgrade immediately, but decides to use the latest version of this integration.

For some reason I could not get the UI config for customizing entities to work, at least not in 2021.9.0. The only available option for state_class was measurement...but doing it the old fashioned yaml-way worked.

Here is what needs to be added to make an updated version compatible with 2021.8.x

configuration.yaml

homeassistant:
  customize: !include customize.yaml

customize.yaml

sensor.fronius_total_energy:
  state_class: measurement
  last_reset: "homeassistant.util.dt.utc_from_timestamp(0)"
sensor.fronius_smartmeter_energy_ac_consumed:
  state_class: measurement
  last_reset: "homeassistant.util.dt.utc_from_timestamp(0)"
sensor.fronius_smartmeter_energy_ac_sold:
  state_class: measurement
  last_reset: "homeassistant.util.dt.utc_from_timestamp(0)"

Where "fronius" in the sensor name needs to match the name of the integration. And a note that this needs to be deleted when the user upgrades to 2021.9.x

from sensor.fronius.

colwilliamsnz avatar colwilliamsnz commented on August 21, 2024

Test branch with HA 2021.9 support here: https://github.com/colwilliamsnz/sensor.fronius

@nilrog appreciate your thoughts on this one (and also the breaking changes noted in the readme). Concerned that HA 2021.9 broke the component (despite suggestions there would be some months of compatibility) and so how best to convey this as visibly as possible.

from sensor.fronius.

nilrog avatar nilrog commented on August 21, 2024

This is a bug in HA that they are not following their own documentation. It will be impossible for third-party integrations to solve this since not everyone will update to 2021.9.0 immediately. And if we were to release a new version through HACS for 2021.9.0 then people, that may still be on 2021.8.x, will update and we will be broken for them.

from sensor.fronius.

colwilliamsnz avatar colwilliamsnz commented on August 21, 2024

Close. Pull request merged 8200043

from sensor.fronius.

Related Issues (20)

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.