GithubHelp home page GithubHelp logo

Invalid config about bureau_of_meteorology HOT 5 CLOSED

bremor avatar bremor commented on May 28, 2024
Invalid config

from bureau_of_meteorology.

Comments (5)

bremor avatar bremor commented on May 28, 2024

Did you install using HACS?

from bureau_of_meteorology.

bremor avatar bremor commented on May 28, 2024

Is there any more details in your logs?

from bureau_of_meteorology.

JerryCih avatar JerryCih commented on May 28, 2024

Imstalled using HACS. Logs is showing this:

Logger: homeassistant.setup
Source: setup.py:280
First occurred: November 15, 2020, 11:30:54 PM (2 occurrences)
Last logged: November 15, 2020, 11:30:58 PM

Unable to prepare setup for platform bureau_of_meteorology.weather: Platform not found (cannot import name 'LENGTH_MILLIMETERS' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)).
Unable to prepare setup for platform bureau_of_meteorology.sensor: Platform not found (cannot import name 'LENGTH_MILLIMETERS' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)).

Could be some sort of conflict with open weather map? reason for asking becaise logs also shows this:

Logger: homeassistant.components.weather
Source: helpers/entity_platform.py:121
Integration: Weather (documentation, issues)
First occurred: November 15, 2020, 11:30:54 PM (1 occurrences)
Last logged: November 15, 2020, 11:30:54 PM

The openweathermap platform for the weather integration does not support platform setup. Please remove it from your config.

When I have some time I might remove open weather map and see.

from bureau_of_meteorology.

bremor avatar bremor commented on May 28, 2024

Cool! You need to be running Home Assistant version 0.116.0 or later for this component. Earlier versions do not have the built in constants LENGTH_MILLIMETERS and PERCENTAGE so you will have to comment them out, and manually define them like below, OR upgrade your Home Assistant.

If you want to modify the code to be compatible with earlier versions of Home Assistant change the following in custom_components\bureau_of_meteorology\sensor.py, but please note that when you update this component it will override your changes.

from homeassistant.const import (
    ATTR_ATTRIBUTION,
    DEVICE_CLASS_HUMIDITY,
    DEVICE_CLASS_TEMPERATURE,
    DEVICE_CLASS_TIMESTAMP,
    #LENGTH_MILLIMETERS, <----- Comment out this line using the #
    #PERCENTAGE, <----- Comment out this line using the #
    TEMP_CELSIUS,
)
LENGTH_MILLIMETERS = "mm" # <---Add this line
PERCENTAGE = "%" # <---Add this line

from bureau_of_meteorology.

JerryCih avatar JerryCih commented on May 28, 2024

thx Bremor, updated and it works now.

from bureau_of_meteorology.

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.