and me? mine works except on pi screen using chromium
Where would it be defined? I just followed the instructions in the first post. Do they assume I have something else defined somewhere? Are there other steps I need to do to make it work?
At the moment I have:
title: Home
resources:
- url: /local/custom-lovelace/sonarr-upcoming-card/sonarr-upcoming-card.js
type: js
# - url: /local/custom_ui/weather-card.js
# type: js
views:
Then down on the tab I have:
# - title: Animated Weather
# icon: mdi:weather-cloudy
# id: weather
# garage_door_tilt_sensor_alarm_level: Weather
# cards:
# - type: "custom:weather-card"
# entity_weather: weather.yweather
# entity_sun: sun.sun
All commented out for now as they aren’t working.
I also copied the css and js to /www/custom_ui/ and the icons to /www/icons/weather_icons (unzipped)
Am I missing something else???
EDIT: Found the Darksky Version and it’s working…
Getting the same error here:
URLOFMYHASS.IO/static/custom-elements-es5-adapter.js:13:615 Uncaught TypeError: Class constructor WeatherCard cannot be invoked without ‘new’
how is it supposed to be fixed?
EDIT: ok, I totally don’t know how but it seems to work now. I haven’t done anything
Anyone? Please.
Just installed this yesterday and it works great…however today I updated to 77.2 and I get the following error in my logs:
MYIP:8123/local/custom_ui/dark-sky-weather-card.js?v=4:17:43 Uncaught TypeError: Cannot read property ‘unit_system’ of undefined
Any suggestions?
Thanks
Change the js code and change the reference from
hass.config.core.unit_system
to
hass.config.unit_system
I have the same error
I tried the change you suggested, but I still get the same error. Do you make this change in two places? Here is a copy of that small section of the js code…I tried changing both and just the first reference and I get the same error in the logs???
const lengthUnit = hass.config.unit_system;
switch (measure) {
case 'air_pressure':
return lengthUnit === 'km' ? 'hPa' : 'inHg';
case 'length':
return lengthUnit;
case 'precipitation':
return lengthUnit === 'km' ? 'mm' : 'in';
default:
return hass.config.unit_system[measure] || '';
Frustrated AH here. Why do I get no response or help but anytime someone else posts an issue they get a response? I heard the community is helpful, but I’m not so sure about that.
Mostly because ppl have no idea how to resolve your issue
I got the same error after updating to 0.77.2.
MYIP:8123/local/custom_ui/dark-sky-weather-card.js?v=4:17:43 Uncaught TypeError: Cannot read property ‘unit_system’ of undefined
Tried the change as suggested by @wingy3181 , but no success…
Hope somebody knows how to fix this…
@arsaboo ??
Yes that was the change I made
The only thing I can suggest is to use Chrome Developer Tools and just debug the error.
There was a breaking change in the last release. Please use the latest files from my repo.
weather-card.js
weather-card.css
Hi @arsaboo , I just tried to set this up for the first time in 0.76.2 but got no card at all in the UI and the log shows:
https://xxx.xx.xx.x:8123/local/custom_ui/weather-card.js:17:50 Uncaught TypeError: Cannot read property ‘length’ of undefined
just wondering if this is an error in the file or something in my lovelace.yaml that is causing the issue…
my lovelace.yaml is as per post #1 of this thread
The card has now been updated for 0.77. It won’t work on anything before that.
I’m running 0.77.2 and i have the same error as the above
2018-09-02 23:25:31 ERROR (MainThread) [frontend.js.latest.201808180] /local/weather-card.js:17:50 Uncaught TypeError: Cannot read property ‘length’ of undefined
Clear your local cache. Or add version to resource file for that card.
Still doesn’t work with the changes. Can see weathercard don’t exist flashing by on reload.
Double check the permissions of the file and the file location.