Skip to content

Weather Blueprint doesn't work with December update for HA #12

Open

Description

@johnsturgeon

I'm getting the error:

Logger: homeassistant.components.automation.awtrix_weather
Source: components/automation/__init__.py:604
Integration: Automation (documentation, issues)
First occurred: December 6, 2023 at 12:57:07 PM (11987 occurrences)
Last logged: 5:29:30 AM

Error rendering variables: JSONDecodeError: Input must be bytes, bytearray, memoryview, or str: line 1 column 1 (char 0)

I mentioned it in the discord, and somebody else was getting the same error every since the December HA update

Activity

  1. jeeftor commented on Dec 7, 2023

    @jeeftor
    Owner

    I think its related to the forecast ... but just updated so I'll take a look soon (taking a sick day today however)

  2. aquatix commented on Aug 15, 2025

    @aquatix

    I see the weatherflow has changed a bit since 2023, but I get a very similar error:

    Logger: homeassistant.components.automation.awtrix_weer_info
    Source: components/automation/__init__.py:663
    integration: Automation ([documentation](https://www.home-assistant.io/integrations/automation), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+automation%22))
    First occurred: 16:41:39 (3 occurrences)
    Last logged: 16:50:00
    Error rendering variables: UndefinedError: None has no element 0
    

    I don't get OpenWeatherMap working because it complains about a missing API key, but I have and use the Forecast sensor from Met.no with hourly forecast.

    Any idea?

    Edit: I applied the changes from https://github.com/jeeftor/HomeAssistant/pull/11/files but that does not seem to help this problem.

  3. jeeftor commented on Aug 15, 2025

    @jeeftor
    Owner

    So I hate to say it but my weather is working fine - however - I'm at work today so I can't really tweak with stuff at home easily.

    It should be just working off the forecast data model...

    The logs should print out some more issues - are you able to share them?

  4. aquatix commented on Aug 15, 2025

    @aquatix

    Gheh, no worries, but I'm just stumped. The above is everything the logs have to say, and the traces say the initial triggers don't even get to run, so I'm a bit at a loss as to how to debug further.

  5. jeeftor commented on Aug 15, 2025

    @jeeftor
    Owner

    I think to start with you can do something like

    Image

    Because that should be the data I'm parsing...

    A belief it works with WeatehrflowCloud

    So this is what I get from weatherflow cloud (it more than that but thats just the 1'st element

      forecast:
        - datetime: "2025-08-15T06:00:00Z"
          is_daytime: null
          cloud_coverage: null
          condition: lightning-rainy
          precipitation_probability: 20
          uv_index: null
          wind_bearing: null
          temperature: 86
          templow: 63
    

    Accuwather has:

      forecast:
        - datetime: "2025-08-15T13:00:00+00:00"
          cloud_coverage: 59
          precipitation_probability: 55
          uv_index: 9
          wind_bearing: 175
          condition: lightning-rainy
          temperature: 92
          apparent_temperature: 93
          templow: 64
          wind_gust_speed: 13.79
          wind_speed: 9.2
          precipitation: 0.04
          humidity: 23
    

    Not sure why I have a null uv_index on weatherflow because I'm about 90% sure that is supposed to work... but lets see what you get

  6. jeeftor commented on Aug 15, 2025

    @jeeftor
    Owner

    Next debug options!

    Click the trace button

    Image

    Then click on Changed Variables

    Image

    Thats what the stuff Is using...

    And each step the changed variables gives you the data set.

    On the second option

    Image

    I can see my forecast data:

    Image
  7. aquatix commented on Aug 15, 2025

    @aquatix

    For the met.no forecast, if I choose the hourly forecast, it gives me this:

    weather.thuis:
      forecast:
        - condition: sunny
          datetime: "2025-08-15T18:00:00+00:00"
          wind_bearing: 351
          cloud_coverage: 8.6
          uv_index: 0.1
          temperature: 20.6
          wind_speed: 16.6
          precipitation: 0
          humidity: 83
        - condition: clear-night
          datetime: "2025-08-15T19:00:00+00:00"
          wind_bearing: 342.8
          cloud_coverage: 8.6
          uv_index: 0
          temperature: 19.6
          wind_speed: 14.4
          precipitation: 0
          humidity: 87
        - condition: cloudy
          datetime: "2025-08-15T20:00:00+00:00"
          wind_bearing: 349.7
          cloud_coverage: 100
          uv_index: 0
          temperature: 19
          wind_speed: 15.5
          precipitation: 0
          humidity: 89
        - condition: cloudy
          datetime: "2025-08-15T21:00:00+00:00"
          wind_bearing: 359.7
          cloud_coverage: 100
          uv_index: 0
          temperature: 19
          wind_speed: 16.6
          precipitation: 0
          humidity: 86
        - condition: cloudy
          datetime: "2025-08-15T22:00:00+00:00"
          wind_bearing: 4.4
          cloud_coverage: 100
          uv_index: 0
          temperature: 19
          wind_speed: 17.6
          precipitation: 0
          humidity: 85
        - condition: cloudy
          datetime: "2025-08-15T23:00:00+00:00"
          wind_bearing: 3.1
          cloud_coverage: 100
          uv_index: 0
          temperature: 18.9
          wind_speed: 18.7
          precipitation: 0
          humidity: 85
        - condition: cloudy
          datetime: "2025-08-16T00:00:00+00:00"
          wind_bearing: 4.6
          cloud_coverage: 100
          uv_index: 0
          temperature: 18.6
          wind_speed: 20.5
          precipitation: 0
          humidity: 85
        - condition: cloudy
          datetime: "2025-08-16T01:00:00+00:00"
          wind_bearing: 10.4
          cloud_coverage: 100
          uv_index: 0
          temperature: 18.5
          wind_speed: 21.6
          precipitation: 0
          humidity: 85
        - condition: partlycloudy
          datetime: "2025-08-16T02:00:00+00:00"
          wind_bearing: 14.3
          cloud_coverage: 54.7
          uv_index: 0
          temperature: 18.2
          wind_speed: 20.5
          precipitation: 0
          humidity: 84
        - condition: partlycloudy
          datetime: "2025-08-16T03:00:00+00:00"
          wind_bearing: 14.7
          cloud_coverage: 75
          uv_index: 0
          temperature: 17.5
          wind_speed: 19.8
          precipitation: 0
          humidity: 87
        - condition: partlycloudy
          datetime: "2025-08-16T04:00:00+00:00"
          wind_bearing: 12.7
          cloud_coverage: 25
          uv_index: 0
          temperature: 17.4
          wind_speed: 18.7
          precipitation: 0
          humidity: 87
        - condition: partlycloudy
          datetime: "2025-08-16T05:00:00+00:00"
          wind_bearing: 8.6
          cloud_coverage: 28.9
          uv_index: 0.1
          temperature: 17.1
          wind_speed: 17.6
          precipitation: 0
          humidity: 88
        - condition: partlycloudy
          datetime: "2025-08-16T06:00:00+00:00"
          wind_bearing: 7.9
          cloud_coverage: 85.2
          uv_index: 0.4
          temperature: 17.7
          wind_speed: 19.8
          precipitation: 0
          humidity: 83
        - condition: partlycloudy
          datetime: "2025-08-16T07:00:00+00:00"
          wind_bearing: 5.2
          cloud_coverage: 60.2
          uv_index: 1.1
          temperature: 18.2
          wind_speed: 20.9
          precipitation: 0
          humidity: 76
        - condition: partlycloudy
          datetime: "2025-08-16T08:00:00+00:00"
          wind_bearing: 2.5
          cloud_coverage: 71.9
          uv_index: 2.3
          temperature: 18.8
          wind_speed: 20.2
          precipitation: 0
          humidity: 72
        - condition: partlycloudy
          datetime: "2025-08-16T09:00:00+00:00"
          wind_bearing: 0.5
          cloud_coverage: 40.6
          uv_index: 3.7
          temperature: 19.1
          wind_speed: 18.7
          precipitation: 0
          humidity: 68
        - condition: partlycloudy
          datetime: "2025-08-16T10:00:00+00:00"
          wind_bearing: 357.5
          cloud_coverage: 25
          uv_index: 4.9
          temperature: 19.7
          wind_speed: 19.8
          precipitation: 0
          humidity: 65
        - condition: partlycloudy
          datetime: "2025-08-16T11:00:00+00:00"
          wind_bearing: 357.8
          cloud_coverage: 40.6
          uv_index: 5.7
          temperature: 20.1
          wind_speed: 21.2
          precipitation: 0
          humidity: 61
        - condition: partlycloudy
          datetime: "2025-08-16T12:00:00+00:00"
          wind_bearing: 360
          cloud_coverage: 35.9
          uv_index: 5.8
          temperature: 20.2
          wind_speed: 20.9
          precipitation: 0
          humidity: 60
        - condition: partlycloudy
          datetime: "2025-08-16T13:00:00+00:00"
          wind_bearing: 359.5
          cloud_coverage: 53.1
          uv_index: 5.1
          temperature: 20
          wind_speed: 20.2
          precipitation: 0
          humidity: 59
        - condition: cloudy
          datetime: "2025-08-16T14:00:00+00:00"
          wind_bearing: 4.8
          cloud_coverage: 90.6
          uv_index: 3.9
          temperature: 19.7
          wind_speed: 21.2
          precipitation: 0
          humidity: 59
        - condition: cloudy
          datetime: "2025-08-16T15:00:00+00:00"
          wind_bearing: 8.7
          cloud_coverage: 100
          uv_index: 2.6
          temperature: 19.1
          wind_speed: 21.6
          precipitation: 0
          humidity: 59
        - condition: cloudy
          datetime: "2025-08-16T16:00:00+00:00"
          wind_bearing: 7.1
          cloud_coverage: 94.5
          uv_index: 1.4
          temperature: 18.7
          wind_speed: 20.9
          precipitation: 0
          humidity: 58
        - condition: partlycloudy
          datetime: "2025-08-16T17:00:00+00:00"
          wind_bearing: 8.8
          cloud_coverage: 71.9
          uv_index: 0.6
          temperature: 18.2
          wind_speed: 20.9
          precipitation: 0
          humidity: 58
  8. jeeftor commented on Aug 15, 2025

    @jeeftor
    Owner

    I'm happy to walk you through various steps while I can

  9. jeeftor commented on Aug 15, 2025

    @jeeftor
    Owner

    Lets see what you have in the trace ... because maybe you have a field difference... or something... but that at least at first looks "decent".

  10. aquatix commented on Aug 15, 2025

    @aquatix

    Yeah, I suspect some subtle difference somewhere.

    About the traces, that's the odd thing: the whole automation seems to fail before it even gets executed:

    Image
  11. jeeftor commented on Aug 15, 2025

    @jeeftor
    Owner

    Also -> I will add a Met.No forecast and see what happens :)

    There are a few sensors too elect in the blueprint... I'll see if I can get it working

  12. jeeftor commented on Aug 15, 2025

    @jeeftor
    Owner

    I can't tell if met.no provides a "current temp" sensor

    Image

    Accuweather for example has a RealFeel sensor

    I'm going to guess this might be the issue off the top of my head.

  13. aquatix commented on Aug 15, 2025

    @aquatix

    I used temperature instead of feels_like

  14. jeeftor commented on Aug 15, 2025

    @jeeftor
    Owner

    And you know that exists or you guess it exists?

    Can you find it in the developer tools?

  15. jeeftor commented on Aug 15, 2025

    @jeeftor
    Owner

    Oh I can juts look at the source code.. .please hold :)

  16. 9 remaining items

  17. aquatix commented on Aug 15, 2025

    @aquatix
    Image

    :(

  18. jeeftor commented on Aug 15, 2025

    @jeeftor
    Owner

    Well Scheisa!

    I'll try open weather on my end I guess...

  19. jeeftor commented on Aug 15, 2025

    @jeeftor
    Owner

    Oh forget that I dont want to deal with subscription stuff...

  20. jeeftor commented on Aug 15, 2025

    @jeeftor
    Owner

    I've successfully tested Accuweater and Weatehrflow

  21. aquatix commented on Aug 15, 2025

    @aquatix

    Wut :) I take it you have latest HA and the latest weaterflow from this repo?

    Waiiiit, the version I have seems to be a different one from the one here. Maybe an older one. Let me try the latest.

  22. aquatix commented on Aug 15, 2025

    @aquatix

    Soooo, that works a lot better; I now get a " Error: Weather entity 'weather.thuis_accuweather' does not support 'hourly' forecast ", I'm going to test a few of the others.

  23. aquatix commented on Aug 15, 2025

    @aquatix

    OK, met.no forecast actually works here :) I only get the current temperature and an animated icon though, no forecast, and no rise/set info.

  24. jeeftor commented on Aug 15, 2025

    @jeeftor
    Owner

    👏🏼

    YEA! We made some progress somewhere at least...

  25. jeeftor commented on Aug 15, 2025

    @jeeftor
    Owner

    Also let it be known that the blueprint "language" is pretty terrible to work with :)

  26. aquatix commented on Aug 15, 2025

    @aquatix
    Image

    It's all purple now with OpenWeatherMap, but it's also clear outside, so maybe that's correct?

  27. aquatix commented on Aug 15, 2025

    @aquatix
    Image

    And sometimes I get this red border.

  28. jeeftor commented on Aug 15, 2025

    @jeeftor
    Owner

    Red border is a timeout function on the last "update" .... I dont recall what the update frequency should be. its prob too high

  29. berlfinn commented on Aug 17, 2025

    @berlfinn

    I don't know if its related, but the automation fails with the following reason:

    Logger: homeassistant.components.automation.awtrix_weather_forecast_service_calls_3
    Quelle: components/automation/__init__.py:663
    Integration: Automation (Dokumentation, Probleme)
    Erstmals aufgetreten: 14:17:20 (862 Vorkommnisse)
    Zuletzt protokolliert: 15:28:45
    
    Error rendering variables: TypeError: '>' not supported between instances of 'NoneType' and 'int'
    

    I guess it has something to do with the forecast request not working?

    config for automation (relevant parts):

    alias: AWTRIX Weather ⛈️ + Forecast + 🌕️ (Service Calls)
    description: ""
    use_blueprint:
      path: jeeftor/awtrix_weatherflow.yaml
      input:
        awtrix:
          - ...
        forecast_var: weather.openweathermap
        current_temp_var: sensor.openweathermap_temperature
        moon: sensor.moon_phase
        moon_rise_set: sensor.ip_geo_location
    ...
    
  30. jeeftor commented on Aug 18, 2025

    @jeeftor
    Owner

    To me this looks like we are missing a sensor/field...

    since NoneType means something doesnt exist

  31. Le-Maxime commented on Aug 19, 2025

    @Le-Maxime

    Template variable error: list object has no element 0 when rendering '{%- macro get_device_topic(device_id) %} {{ states((device_entities(device_id) | select('search','device_topic') | list)[0]) }} {%- endmacro %} {%- set ns = namespace(devices=[]) %} {%- for device_id in device_ids %} {%- set device=get_device_topic(device_id)|replace(' ','') %} {% set ns.devices = ns.devices + [ device ~ '/custom/' ~ app_topic] %} {%- endfor %} {{ ns.devices | reject('match','unavailable') | list}}'

    Error rendering variables: UndefinedError: list object has no element 0

    Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions