New custom component: France weather alerts from Météo France

No I don’t Have this message but when I launch the home assistant service in the logs, I have ERROR (MainThread) [homeassistant.setup] Setup failed for meteo_france: Integration 'meteo_france' did not return boolean if setup was successful. Disabling component.

What does it mean ?

It means something went wrong during the loading of the component
Can you reproduce ? If yes can you put log level to debug for this component?

Here you’ll find the logs on meteo_france :

DEBUG (MainThread) [homeassistant.bootstrap] Setting up {‘discovery’, ‘updater’, ‘binary_sensor’, ‘sun’, ‘system_health’, ‘http’, ‘yeelight’, ‘script’, ‘frontend’, ‘google’, ‘ssdp’, ‘history’, ‘notify’, ‘webhook’, ‘switch’, ‘sensor’, ‘media_player’, ‘lovelace’, ‘group’, ‘automation’, ‘device_tracker’, ‘logbook’, ‘mobile_app’, ‘person’, ‘ffmpeg’, ‘ring’, ‘xiaomi_aqara’, ‘auth’, ‘map’, ‘default_config’, ‘websocket_api’, ‘rflink’, ‘met’, ‘cover’, ‘zeroconf’, ‘config’, ‘meteo_france’, ‘api’, ‘onboarding’, ‘tts’, ‘zone’, ‘cloud’, ‘speedtestdotnet’}

INFO (MainThread) [homeassistant.setup] Setting up meteo_france
ERROR (SyncWorker_2) [homeassistant.components.meteo_france] Expecting value: line 1 column 1 (char 0)
INFO (MainThread) [homeassistant.setup] Setup of domain meteo_france took 2.6 seconds.
ERROR (MainThread) [homeassistant.setup] Setup failed for meteo_france: Integration ‘meteo_france’ did not return boolean if setup was successful. Disabling component.
DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following components and platforms could not be set up:

DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=persistent_notification.invalid_config, old_state=None, new_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following components and platforms could not be set up:

I have HASSBIAN 0.96.4

pi@hassbian:~ $ python
Python 2.7.16 (default, Apr  6 2019, 01:42:57)

pi@hassbian:~ $ python3
Python 3.7.3 (default, Apr  3 2019, 05:39:12)

I’ve reproduced the issue. I think this is related to meteofrance.com website which is down currently. Too hot in France :grinning::hot_face:

I will monitor.

Hahaha :rofl::rofl:
Wait & see.

Thanks you

It seems that meteo france site is accessible but the error is still there:
“Setup failed for meteo_france: Integration ‘meteo_france’ did not return boolean if setup was successful. Disabling component”

@domtik can you confirm if you go to http://www.meteofrance.com you are not redirected to http://vigiprevi.meteofrance.com/PREV/V/index.html ?

Because if you are redirected I think this is normal the component do not succeed to scrap the required data.

Yep I just noticed that ! Looks like Meteo France administration is failing yet more than usual ! Is it the source problem of component not able to start ? Component should be able to handle that stating data unavalaible instead of failing completely at start :wink:

Yes you are right, i did not notice the redirection. Thank you for the heads up

An issue is open to follow this issue.
https://github.com/home-assistant/home-assistant/issues/25513

as usual, a temporary error when I update HA :frowning:

Thanks Works fine now :slight_smile:

Awesome!
I missed the announcement of this component
Thanks

1 Like

Don’t hesitate to share feedback and ideas for improvement. With @victorcerutti we are working on it.

1 Like

Hello everybody !

I’m looking for a good custom card for the Meteo France informations to show the alert level with color, maybe a progress bar with the rain information…
Could you share, if you custom your HA, the information about it.

Thank you

I don’t remind having seeing any custom card for Meteo France.
If you start developing something, don’t hesitate to share.

I confirm that, but I create a lovelace card if you want : It displays, for each 10 minutes, if it’ll rain in function of the color of the card. You can see the code and an example:

cards:
  - color_type: card
    entity: sensor.city_next_rain
    name: Now
    show_icon: false
    show_state: false
    state:
      - color: 'rgb(204, 217, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_0min == 2)
          ]]]
      - color: 'rgb(128, 159, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_0min == 3)
          ]]]
      - color: 'rgb(51, 102, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_0min == 4)
          ]]]
      - color: 'rgb(255, 255, 255)'
        operator: default
    styles:
      card:
        - height: 50px
    type: 'custom:button-card'
  - color_type: card
    entity: sensor.city_next_rain
    name: 10
    show_icon: false
    show_state: false
    state:
      - color: 'rgb(204, 217, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_10min == 2)
          ]]]
      - color: 'rgb(128, 159, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_10min == 3)
          ]]]
      - color: 'rgb(51, 102, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_10min == 4)
          ]]]
      - color: 'rgb(255, 255, 255)'
        operator: default
    styles:
      card:
        - height: 50px
    type: 'custom:button-card'
  - color_type: card
    entity: sensor.city_next_rain
    name: 20
    show_icon: false
    show_state: false
    state:
      - color: 'rgb(204, 217, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_20min == 2)
          ]]]
      - color: 'rgb(128, 159, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_20min == 3)
          ]]]
      - color: 'rgb(51, 102, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_20min == 4)
          ]]]
      - color: 'rgb(255, 255, 255)'
        operator: default
    styles:
      card:
        - height: 50px
    type: 'custom:button-card'
  - color_type: card
    entity: sensor.city_next_rain
    name: 30
    show_icon: false
    show_state: false
    state:
      - color: 'rgb(204, 217, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_30min == 2)
          ]]]
      - color: 'rgb(128, 159, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_30min == 3)
          ]]]
      - color: 'rgb(51, 102, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_30min == 4)
          ]]]
      - color: 'rgb(255, 255, 255)'
        operator: default
    styles:
      card:
        - height: 50px
    type: 'custom:button-card'
  - color_type: card
    entity: sensor.city_next_rain
    name: 40
    show_icon: false
    show_state: false
    state:
      - color: 'rgb(204, 217, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_40min == 2)
          ]]]
      - color: 'rgb(128, 159, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_40min == 3)
          ]]]
      - color: 'rgb(51, 102, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_40min == 4)
          ]]]
      - color: 'rgb(255, 255, 255)'
        operator: default
    styles:
      card:
        - height: 50px
    type: 'custom:button-card'
  - color_type: card
    entity: sensor.city_next_rain
    name: 50
    show_icon: false
    show_state: false
    state:
      - color: 'rgb(204, 217, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_50min == 2)
          ]]]
      - color: 'rgb(128, 159, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_50min == 3)
          ]]]
      - color: 'rgb(51, 102, 255)'
        operator: template
        value: |
          [[[
            return states['sensor.city_next_rain'].attributes
            && (states['sensor.city_next_rain'].attributes.rain_level_50min == 4)
          ]]]
      - color: 'rgb(255, 255, 255)'
        operator: default
    styles:
      card:
        - height: 50px
    type: 'custom:button-card'
title: Pluie
type: horizontal-stack

image

3 Likes

Hello,

Do you know how I can get the temperature max and min for tomorrow ? Because, in the attributes, the forecast information is “Object object” only…

Hello,
Do you know if it possible to add 2 sensors for the current day : the temperature max and temperature min, because they miss include in my home assistant lovelace ?

Thank you in advance !

Hi @oncleben31,
Thank you for this great work! Is it possible to include humidity too? It seems to be lacking for now.