GithubHelp home page GithubHelp logo

Comments (5)

caiosweet avatar caiosweet commented on June 20, 2024

That's right. There is no unit of measurement for the number of earthquakes. The only units of measurement are those listed here. For this reason I chose to force a constant in English "quakes" as the unit of measurement. (another word that could be used would be "events")

from home-assistant-custom-components-ingv.

SiriosDev avatar SiriosDev commented on June 20, 2024

is it not possible to create a translation file for the unit of measurement? if Italian use terremoti(or maybe scosse) if English use quakes etc.

from home-assistant-custom-components-ingv.

caiosweet avatar caiosweet commented on June 20, 2024

I have no idea, but I can suggest a much quicker way that solves your problem.
Use customize.

Just add something similar (see the code below) to the yaml configuration file, then choose restart and quick restart and you will have the unit of measurement that is inserted in the entity customization (my entity ID is sensor.ingv_earthquakes_casa_status, obviously you will have to use yours if it is different πŸ˜„)

homeassistant:
  customize:
    # Add an entry for each entity that you want to overwrite.
    sensor.ingv_earthquakes_casa_status:
      unit_of_measurement: "scosse"

from home-assistant-custom-components-ingv.

SiriosDev avatar SiriosDev commented on June 20, 2024

oh yes, I know, I already did. my intention was to help those who use this extension, making their life easier (specially for newbies)

from home-assistant-custom-components-ingv.

caiosweet avatar caiosweet commented on June 20, 2024

I have no idea if it can be done with the translation of the state or just the attributes, I should try when I have more free time.
strings.json
entity state attributes

from home-assistant-custom-components-ingv.

Related Issues (11)

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.