Giter VIP home page Giter VIP logo

ha-knmi's Introduction

Hi there, I'm Sander - aka golles 👋

BuyMeCoffee

I'm a Developer and Home Automation enthousiast!!

  • 🤓 I’m currently learning Python 🐍
  • 📱 Mobile app developer since 2012
  • 🏢 Working for TomTom 🛰️ since 2011
  • 🎯 Goals: Contribute more to Open Source projects
  • 🤽‍♂️ Sports: I play water polo

Connect with me:

golles.nl golles | GitHub golles | Twitter golles | LinkedIn golles | Instagram golles | Instagram


Languages and Tools:

Visual Studio Code Terminal HTML CSS Terminal JavaScript React Native Java Android Python Docker Bash SQL MySQL Git GitHub



GitHub stats

golles's GitHub stats golles's GitHub languages



Recent GitHub activity

  1. 🗣 Commented on #935 in nielsfaber/alarmo
  2. 🗣 Commented on #24 in golles/Home-Assistant-Sensor-MC66C
  3. 🗣 Commented on #144 in golles/ha-knmi
  4. 🗣 Commented on #22387 in Koenkk/zigbee2mqtt
  5. 🗣 Commented on #22388 in Koenkk/zigbee2mqtt
  6. 🗣 Commented on #22387 in Koenkk/zigbee2mqtt
  7. 🗣 Commented on #67 in golles/mock-yaml-secrets-action
  8. 🗣 Commented on #67 in golles/mock-yaml-secrets-action
  9. ❌ Closed PR #74 in golles/mock-yaml-secrets-action
  10. 🎉 Merged PR #75 in golles/mock-yaml-secrets-action

ha-knmi's People

Contributors

dependabot[bot] avatar golles avatar hmmbob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ha-knmi's Issues

Value d2tmin can't be converted to <class 'float'>

Did you read the instructions?

The problem

I'm getting the following messages in my logfile:

--
This error originated from a custom integration.

Logger: custom_components.knmi
Source: custom_components/knmi/coordinator.py:48
Integration: KNMI (documentation, issues)
First occurred: 06:00:00 (4 occurrences)
Last logged: 09:00:00

Value d2tmin can't be converted to <class 'float'>
Value d2tmax can't be converted to <class 'float'>

And I was wondering if something has changed?

Integration version

1.6

Home Assistant version

HA 2023.9.3

Python version

3.11

Home Assistant log

This error originated from a custom integration.

Logger: custom_components.knmi
Source: custom_components/knmi/coordinator.py:48
Integration: KNMI (documentation, issues)
First occurred: 06:00:00 (4 occurrences)
Last logged: 09:00:00

Value d2tmin can't be converted to <class 'float'>
Value d2tmax can't be converted to <class 'float'>

Diagnostics

No response

Additional information

No response

Current condition

Did you read the instructions?

The problem

I don't think below is the correct 'current condition'.
d0weer is the forecast for today and isn't changing during the day, while image is in my eyes the 'current condition' and changing during the day.

weather.py

    @property
    def condition(self) -> str | None:
        """Return the current condition."""
        if self.coordinator.get_value("d0weer") is not None:
            return CONDITIONS_MAP[self.coordinator.get_value("d0weer")]
        return None

What version of this integration has the issue?

1.3.1

What version of Home Assistant Core has the issue?

2022.11.2

Home Assistant log

No response

Diagnostics

No response

Additional information

No response

Weather warning does not take into account the location

Did you read the instructions?

The problem

It seems the weather warning input boolean and attributes does not take into account if the warning is applicable to the location configured in the integration. Both knmi.nl and weerlive.nl currently do not show weather alerts for this region but the integration does.
weerlive
knmi
integration

Integration version

1.6.1

Home Assistant version

core-2023.11.3

Python version

3.11.6

Home Assistant log

No response

Diagnostics

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.11.3",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.6",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Amsterdam",
    "os_name": "Linux",
    "os_version": "6.1.21-v8",
    "supervisor": "2023.11.6",
    "host_os": "Home Assistant OS 11.1",
    "docker_version": "24.0.6",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "hacs": {
      "version": "1.33.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "spook_inverse": {
      "version": "1.3.2",
      "requirements": []
    },
    "knmi": {
      "version": "1.6.1",
      "requirements": []
    },
    "spook": {
      "version": "1.3.2",
      "requirements": []
    },
    "presence_simulation": {
      "version": "3.2",
      "requirements": []
    },
    "webrtc": {
      "version": "v3.5.0",
      "requirements": []
    },
    "powercalc": {
      "version": "v1.9.8",
      "requirements": [
        "numpy>=1.21.1"
      ]
    }
  },
  "integration_manifest": {
    "domain": "knmi",
    "name": "KNMI",
    "codeowners": [
      "@golles"
    ],
    "config_flow": true,
    "documentation": "https://github.com/golles/ha-knmi/blob/main/README.md",
    "iot_class": "cloud_polling",
    "issue_tracker": "https://github.com/golles/ha-knmi/issues",
    "version": "1.6.1",
    "is_built_in": false
  },
  "data": {
    "config_entry": {
      "entry_id": "902dc2c2d9d4557a359f610d0f0a6ecd",
      "version": 1,
      "domain": "knmi",
      "title": "Chateau Rijnenburg",
      "data": {
        "name": "Chateau Rijnenburg",
        "latitude": "**REDACTED**",
        "longitude": "**REDACTED**",
        "api_key": "**REDACTED**"
      },
      "options": {},
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "unique_id": null,
      "disabled_by": null
    },
    "data": {
      "plaats": "Utrecht",
      "timestamp": "1701427384",
      "time": "01-12-2023 11:43",
      "temp": "-0.6",
      "gtemp": "-3.2",
      "samenv": "Onbewolkt",
      "lv": "86",
      "windr": "NO",
      "windrgr": "44",
      "windms": "2",
      "winds": "2",
      "windk": "3.9",
      "windkmh": "7.2",
      "luchtd": "1008.1",
      "ldmmhg": "756",
      "dauwp": "-2.6",
      "zicht": "10",
      "verw": "Perioden met zon, in het noorden een winterse bui",
      "sup": "08:22",
      "sunder": "16:33",
      "image": "zonnig",
      "d0weer": "halfbewolkt",
      "d0tmax": "2",
      "d0tmin": "-2",
      "d0windk": "2",
      "d0windknp": "6",
      "d0windms": "3",
      "d0windkmh": "11",
      "d0windr": "NO",
      "d0windrgr": "44",
      "d0neerslag": "0",
      "d0zon": "69",
      "d1weer": "halfbewolkt",
      "d1tmax": "2",
      "d1tmin": "-4",
      "d1windk": "2",
      "d1windknp": "4",
      "d1windms": "2",
      "d1windkmh": "7",
      "d1windr": "ZW",
      "d1windrgr": "225",
      "d1neerslag": "30",
      "d1zon": "50",
      "d2weer": "halfbewolkt_regen",
      "d2tmax": "2",
      "d2tmin": "-3",
      "d2windk": "2",
      "d2windknp": "6",
      "d2windms": "3",
      "d2windkmh": "11",
      "d2windr": "Z",
      "d2windrgr": "180",
      "d2neerslag": "70",
      "d2zon": "30",
      "alarm": "1",
      "alarmtxt": "Vooral op lokale wegen in Friesland, Groningen en Noord-Holland is er vanochtend kans op plaatselijke gladheid door bevriezing van natte weggedeelten.  Vanavond kan het vooral in Friesland, Groningen en Noord-Holland opnieuw plaatselijk glad worden door sneeuwbuien. Komende nacht en zaterdagochtend ook door een sneeuwdek en/of bevriezing van natte weggedeelten."
    }
  }
}

Additional information

No response

No sensors appearing after installation and no means to configure

Did you read the instructions?

The problem

I installed the KNMI integration via HACS, all files are present in the custom_components/knmi folder. The KNMI integration is shown in the HACS overview.
No errors in the log, only the usual warning "We found a custom integration knmi which has not been tested by Home Assistant. This component might cause stability problems". The good news here is that the integration has been detected.
However, no sensors related to KNMI are present in the entity list and I can't find a way to configure anything...

What version of this integration has the issue?

1.1.7

What version of Home Assistant Core has the issue?

core-2022.5.3

Home Assistant log

2022-05-10 12:45:27 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration knmi which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-05-10 12:45:27 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration sonoff which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-05-10 12:45:27 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration brandstofprijzen which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-05-10 12:45:27 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-05-10 12:45:40 INFO (Thread-3) [homeassistant.components.mqtt] Connected to MQTT server 192.168.2.40:1883 (0)
2022-05-10 12:45:41 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to homeassistant/+/+/config, mid: 1
2022-05-10 12:45:43 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to homeassistant/+/+/+/config, mid: 2
2022-05-10 12:45:46 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tasmota/discovery/#, mid: 3
2022-05-10 12:45:48 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to thuis/joop, mid: 4
2022-05-10 12:45:48 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to verjaardagen, mid: 5
2022-05-10 12:45:48 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to hal/deurbel, mid: 6
2022-05-10 12:45:48 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on hal/deurbel (retained): b'off'
2022-05-10 12:45:48 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to stat/sonoff/POWER, mid: 7
2022-05-10 12:45:48 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to thuis/ger, mid: 8
2022-05-10 12:45:48 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tasmota/discovery/#, mid: 9
2022-05-10 12:46:02 WARNING (MainThread) [zigpy_znp.zigbee.application] Your network is using the insecure Zigbee2MQTT network key!
2022-05-10 12:46:02 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'unknown' when rendering template '{{ ((states('sensor.cresta_8001_rain') | float) - (states('input_number.midnight_rain') | float)) | round(1, default=0) }}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.6
2022-05-10 12:46:02 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'unknown' when rendering template '{{ ((states('sensor.cresta_8001_rain') | float) - (states('input_number.midnight_rain') | float)) | round(1, default=0) }}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.6
2022-05-10 12:46:04 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on homeassistant/status: 'online', mid: 10
2022-05-10 12:46:57 WARNING (MainThread) [homeassistant.components.zha.core.channels.base] [0x1444:1:0x0006]: async_initialize: all attempts have failed: [DeliveryError('Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>'), DeliveryError('Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>'), DeliveryError('Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>'), DeliveryError('Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>')]
2022-05-10 12:46:57 WARNING (MainThread) [homeassistant.components.zha.core.channels.base] [0x1444:1:0x0008]: async_initialize: all attempts have failed: [DeliveryError('Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>'), DeliveryError('Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>'), DeliveryError('Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>'), DeliveryError('Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>')]

Additional information

No response

Perhaps a parsing error????

Did you read the instructions?

The problem

Hi,

Knmi has issued a warning. I noticed the following in this warning

temperaturen van 32-36°C

I have no idea if this is a parsing issue or knmi issue. What do you think?

What version of this integration has the issue?

1.2.20

What version of Home Assistant Core has the issue?

2022.7.5

Home Assistant log

No response

Additional information

No response

Add "precipitation_chance"

Did you read the instructions?

The request

Hi,

Could you please add "precipitation_chance"? Would be awesome. Thanks for all the hard work.

image

Additional information

No response

Error message in log file

Did you read the instructions?

The problem

Hi,

I’m getting the following errors in my log file

—-

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/knmi/weather.py:104
Integration: KNMI (documentation, issues)
First occurred: 01:06:39 (96 occurrences)
Last logged: 09:01:39

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 151, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 339, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 572, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/usr/src/homeassistant/homeassistant/components/weather/init.py", line 698, in state_attributes
if self.forecast is not None:
File "/config/custom_components/knmi/weather.py", line 104, in forecast
int(super().get_data(f"d{i}windrgr"))
ValueError: invalid literal for int() with base 10: ''


I do not know if they are related to issue #33 ?

What version of this integration has the issue?

1.1.11

What version of Home Assistant Core has the issue?

2022.7.5

Home Assistant log

2022-07-15 08:56:27 INFO (MainThread) [homeassistant.setup] Setting up knmi
2022-07-15 08:56:27 INFO (MainThread) [homeassistant.setup] Setup of domain knmi took 0.0 seconds
2022-07-15 08:56:33 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.knmi
2022-07-15 08:56:33 INFO (MainThread) [homeassistant.components.weather] Setting up weather.knmi
2022-07-15 08:58:16 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.knmi
2022-07-15 08:58:28 INFO (MainThread) [homeassistant.components.automation.weeralarm] Initialized trigger Weeralarm: Weeralarm KNMI
File "/config/custom_components/knmi/weather.py", line 104, in forecast
File "/config/custom_components/knmi/weather.py", line 104, in forecast
File "/config/custom_components/knmi/weather.py", line 104, in forecast
File "/config/custom_components/knmi/weather.py", line 104, in forecast
File "/config/custom_components/knmi/weather.py", line 104, in forecast

Additional information

No response

attributes on binary_sensor contain unit inside the state

Did you read the instructions?

The request

when using a template on the attributes of the binary_sensor.knmi_zon, there are 2 issue, of whihc 1 is really of importance since it impacts use of that attribute:

{{state_attr('binary_sensor.knmi_zon','Zonkans vandaag')}}

contains the unit %, which is not as it should.

Scherm­afbeelding 2023-02-12 om 15 10 52

The attribute really should only contain the value, so we can use it in other Dashboard cards, or even template/automation logic

please consider taking out the unit of the state of the attribute.

compare Buienradar entity for that:

Scherm­afbeelding 2023-02-12 om 15 25 15

secondary suggestion: consider the attributes names to use underscores and lower characters only. Frontend takes care f showing those correctly, but it would be following HA design better to be able to use:

{{state_attr('binary_sensor.knmi_zon','zonkans_vandaag')}}

thanks for considering

Additional information

this is an example of a config that wont show:

      - type: custom:mini-graph-card
        show:
          graph: bar
        entities:
          - entity: binary_sensor.knmi_zon
            name: Vandaag
            attribute: Zonkans vandaag
          - entity: binary_sensor.knmi_zon
            name: Morgen
            attribute: Zonkans morgen
          - entity: binary_sensor.knmi_zon
            name: Overmorgen
            attribute: Zonkans overmorgen

or eg the bar card:

      - type: custom:bar-card
         title: Kans op zon
        show:
          labels: true
         severity:
           - color: Grey
             from: 0
             to: 25
           - color: Skyblue
             from: 26
             to: 50
           - color: Gold
             from: 51
             to: 100
        entities:
          - entity: binary_sensor.knmi_zon
            name: Vandaag
            attribute: Zonkans vandaag
          - entity: binary_sensor.knmi_zon
            name: Morgen
            attribute: Zonkans morgen
          - entity: binary_sensor.knmi_zon
            name: Overmorgen
            attribute: Zonkans overmorgen

which seemingly shows the correct attribute, but not the graph nor the color... because the value is not as it is expected to be,

Scherm­afbeelding 2023-02-12 om 15 19 06

Integratie ondersteunt geen configuratie via de UI

Did you read the instructions?

The problem

Foutmelding, wanneer de KNMI integratie wordt toegevoegd:

"Deze intergratie ondersteunt geen configuratie via de UI. Als u deze link van de homeassitant website heeft gevolgd, zorg er dan voor dat u de nieuwste versie van Home assistant draait."

core versie 2022.3.8
supervisor 2022.03.5
host OS 7.5

What version of this integration has the issue?

1.1.7

What version of Home Assistant Core has the issue?

core-2022.3.8

Home Assistant log

No response

Additional information

No response

Waarschuwing per gebied

Did you read the instructions?

The request

Hoi,

Ik weet niet of het mogelijk is, maar nu ontvang ik na alle tevredenheid in 1 waarschuwing een totaal overzicht van alle waarschuwingen over heel NL.

Is het ook mogelijk om waarschuwingen te krijgen voor bijv. 1 provincie?

Mvg,
haaino

Additional information

No response

Error installing custom component

Did you read the instructions?

The problem

After an update , not sure which one, I decided to reinstall the knmi integration using HACS. Trying to add integration in Homeassistant I'm getting the following message:

Error
This integration does not support configuration via the UI. If you followed this link from the Home Assistant website, make sure you run the latest version of Home Assistant.

Older versions of this component/HA worked fine.

What version of this integration has the issue?

1.2.0

What version of Home Assistant Core has the issue?

core 2022.7.0 or higher

Home Assistant log

2022-07-22 09:16:19 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration knmi which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-07-22 09:16:19 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-07-22 09:16:19 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration google_home which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-07-22 09:16:19 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration nefiteasy which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-07-22 09:16:19 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration afvalwijzer which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-07-22 09:16:19 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration buienalarm which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-07-22 09:17:06 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.knmi.config_flow
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/loader.py", line 618, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/loader.py", line 635, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/home/homeassistant/.homeassistant/custom_components/knmi/__init__.py", line 83, in <module>
    class KnmiDataUpdateCoordinator(DataUpdateCoordinator):
  File "/home/homeassistant/.homeassistant/custom_components/knmi/__init__.py", line 107, in KnmiDataUpdateCoordinator
    ) -> float | int | str | None:
TypeError: unsupported operand type(s) for |: 'type' and 'type'
2022-07-22 09:17:06 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration knmi: Exception importing custom_components.knmi.config_flow

Additional information

No response

Integration using entry_type

Did you read the instructions?

The problem

There is an error in the logs that says an integration is using entry_type and that it will be deprecated in 2022.3.
I looked through all my custom integrations and this one uses entry_type.

What version of this integration has the issue?

newest

What version of Home Assistant Core has the issue?

2021.12.9

Home Assistant log

2022-01-12 16:56:34 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that uses str for device registry entry_type. This is deprecated and will stop working in Home Assistant 2022.3, it should be updated to use DeviceEntryType instead. Please report this issue.

Additional information

No response

Weather entity unavailable

Did you read the instructions?

The problem

The entity weather.my_location is unavailable since the last update (1.3.2) but could be missing on an earlier version. I noticed it today. Reinstalling the integration does not solve this and adds the unavailable entity.

The following error comes up with the entity:

This entity is no longer being provided by the knmi integration. If the entity is no longer in use, delete it in settings.

What version of this integration has the issue?

1.3.2

What version of Home Assistant Core has the issue?

2022.11.3

Home Assistant log

Logger: homeassistant.components.weather
Source: custom_components/knmi/__init__.py:111 
Integration: Weather (documentation, issues) 
First occurred: 23:00:12 (2 occurrences) 
Last logged: 23:00:12

Error adding entities for domain weather with platform knmi
Error while setting up knmi platform for weather
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 692, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 789, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/weather/__init__.py", line 710, in state_attributes
    if self.forecast is not None:
  File "/config/custom_components/knmi/weather.py", line 150, in forecast
    wind_bearing = self.coordinator.get_value(f"d{i}windrgr", float)
  File "/config/custom_components/knmi/__init__.py", line 111, in get_value
    return convert_to(self.data.get(key, None))
ValueError: could not convert string to float: ''

Diagnostics

Not available

Additional information

No response

The knmi integration is using deprecated forecast (2023.9 beta)

Did you read the instructions?

The problem

Just leaving this here: if you get this error on b0 of the 2023.8 release, just wait for the final release: it's being fixed in core: home-assistant/core#97290

Logger: homeassistant.components.weather
Source: components/weather/__init__.py:169
Integration: Weer (documentation, issues)
First occurred: 08:42:28 (1 occurrences)
Last logged: 08:42:28

custom_components.knmi.weather::KnmiWeather is overriding deprecated methods on an instance of WeatherEntity, this is not valid and will be unsupported from Home Assistant 2023.1. Please report it to the custom integration author.

Integration version

1.5.0

Home Assistant version

core-2023.8.0b0

Python version

3.11

Home Assistant log

No response

Diagnostics

No response

Additional information

No response

Created sensors for all available information

Did you read the instructions?

The request

Hi,
First of all thank you this helpful component.
Would it be possible to create sensors for all API-information?
This would be very very useful.
Thank you very much. ;)

Additional information

liveweer  
0  
plaats "Amsterdam"
temp "21.1"
gtemp "19.2"
samenv "Onbewolkt"
lv "51"
windr "NW"
windrgr "315"
windms "4"
winds "3"
windk "7.8"
windkmh "14.4"
luchtd "1031.4"
ldmmhg "774"
dauwp "10"
zicht "35"
verw "Zwaar bewolkt en droog"
sup "05:27"
sunder "22:04"
image "zonnig"
d0weer "halfbewolkt"
d0tmax "22"
d0tmin "13"
d0windk "2"
d0windknp "6"
d0windms "3"
d0windkmh "11"
d0windr "W"
d0windrgr "270"
d0neerslag "0"
d0zon "48"
d1weer "bewolkt"
d1tmax "22"
d1tmin "12"
d1windk "3"
d1windknp "8"
d1windms "4"
d1windkmh "15"
d1windr "NW"
d1windrgr "315"
d1neerslag "30"
d1zon "30"
d2weer "bewolkt"
d2tmax "18"
d2tmin "13"
d2windk "2"
d2windknp "6"
d2windms "3"
d2windkmh "11"
d2windr "NW"
d2windrgr "315"
d2neerslag "20"
d2zon "20"
alarm "0"

binary_sensor alert won't change icon (color)

Did you read the instructions?

The problem

seems the icon of the binary_sensor does not change depending on state.

Trying to set it to another device_class in the UI doesn't not work either.

always showing the alert state with exclamation mark:

Scherm­afbeelding 2023-02-14 om 16 56 21

Scherm­afbeelding 2023-02-14 om 16 56 28

while a safe icon of this device_class should show:

Scherm­afbeelding 2023-02-14 om 16 57 35

also adding to this issue, is that even though

state_color: true

is set in the entities card, the binary_sensor does not change color to alert color as it should. The more-info does not show either, so it's an integration issue, not a frontend issue.

compare:

Scherm­afbeelding 2023-02-14 om 16 59 53

and more info:

Scherm­afbeelding 2023-02-14 om 17 00 17

What version of this integration has the issue?

1.3.7

What version of Home Assistant Core has the issue?

2023.2.4

Home Assistant log

No response

Diagnostics

config_entry-knmi-c25fc6a1ec4907582d45a36a2dc3df54.json.txt

Additional information

No response

Time out issue?

Did you read the instructions?

The problem

I’m getting the following warnings and error in my logfile
——-
This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/knmi/binary_sensor.py:142 
Integration: KNMI (documentation, issues) 
First occurred: 11:30:11 (5 occurrences) 
Last logged: 19:30:12

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 151, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 348, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 570, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py", line 209, in state
    if (is_on := self.is_on) is None:
  File "/config/custom_components/knmi/binary_sensor.py", line 106, in is_on
    sunrise = self.time_as_datetime(self.coordinator.get_value("sup"))
  File "/config/custom_components/knmi/binary_sensor.py", line 142, in time_as_datetime
    time_array = time.split(":")
AttributeError: 'NoneType' object has no attribute 'split'

And at the same time

This error originated from a custom integration.

Logger: custom_components.knmi
Source: custom_components/knmi/api.py:29 
Integration: KNMI (documentation, issues) 
First occurred: 11:30:11 (5 occurrences) 
Last logged: 19:30:12

Error fetching information from http://weerlive.nl/api/json-data-10min.php?key=Numbers&cd4&locatie=52.,bunch of numbers - Cannot connect to host weerlive.nl:80 ssl:default [Network unreachable]

What version of this integration has the issue?

Latest

What version of Home Assistant Core has the issue?

2022.8.2

Home Assistant log

No response

Additional information

I think it has to do with the fact that the host was unreachable?

Too many api calls

Did you read the instructions?

The problem

All sensors have become unavailable. Looking at log, it says "Error in API! - Exceeded Daily Limit".
Is there some way one can select how often the sensors are updated?
KNMI says the limit is 300 per day. Maybe you can add a frequecy, which has to be 5 minutes minimal?

What version of this integration has the issue?

1.3.8

What version of Home Assistant Core has the issue?

2023.4.4

Home Assistant log

Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.knmi
Source: custom_components/knmi/api.py:33
Integration: KNMI (documentation, issues)
First occurred: 12:35:44 (30 occurrences)
Last logged: 14:29:11

Error in API! - Exceeded Daily Limit

Diagnostics

No response

Additional information

No response

Forecast extension

Did you read the instructions?

The request

Hi,

I noticed that there is pressure attribute in the current weather, but it is not in the forecast. Is it possible to extend the forecast attributes with this as well? I have no idea if this is possible.

Same applies for humidity, visibility and precipitation

Thank you already for all the good work!

Additional information

No response

Lots of errors since 29-10

Did you read the instructions?

The problem

I have lots of errors (~2500) in my log file (2x 1220) since 29 October:

Scherm­afbeelding 2023-10-30 om 19 51 25

knmi.txt.zip

Sample:

2023-10-29 12:18:16.974 WARNING (MainThread) [custom_components.knmi] Value lv is empty in API response
2023-10-29 12:18:46.972 WARNING (MainThread) [custom_components.knmi] Value dauwp can't be converted to <class 'float'>
2023-10-29 12:18:46.973 WARNING (MainThread) [custom_components.knmi] Value lv is empty in API response
ValueError: Sensor sensor.knmi_thuis_dauwpunt has device class 'temperature', state class 'measurement' unit '°C' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'onb.' (<class 'str'>)
2023-10-29 12:19:16.974 WARNING (MainThread) [custom_components.knmi] Value dauwp can't be converted to <class 'float'>
2023-10-29 12:19:16.975 WARNING (MainThread) [custom_components.knmi] Value lv is empty in API response
2023-10-29 12:19:46.974 WARNING (MainThread) [custom_components.knmi] Value dauwp can't be converted to <class 'float'>

Integration version

1.6.1

Home Assistant version

core-2023.10.5

Python version

3.11.5

Home Assistant log

2023-10-29 12:18:16.974 WARNING (MainThread) [custom_components.knmi] Value lv is empty in API response
2023-10-29 12:18:46.972 WARNING (MainThread) [custom_components.knmi] Value dauwp can't be converted to <class 'float'>
2023-10-29 12:18:46.973 WARNING (MainThread) [custom_components.knmi] Value lv is empty in API response
ValueError: Sensor sensor.knmi_thuis_dauwpunt has device class 'temperature', state class 'measurement' unit '°C' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'onb.' (<class 'str'>)
2023-10-29 12:19:16.974 WARNING (MainThread) [custom_components.knmi] Value dauwp can't be converted to <class 'float'>
2023-10-29 12:19:16.975 WARNING (MainThread) [custom_components.knmi] Value lv is empty in API response
2023-10-29 12:19:46.974 WARNING (MainThread) [custom_components.knmi] Value dauwp can't be converted to <class 'float'>

Diagnostics

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.10.5",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.5",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Amsterdam",
    "os_name": "Linux",
    "os_version": "6.1.59",
    "supervisor": "2023.10.1",
    "host_os": "Home Assistant OS 11.1",
    "docker_version": "24.0.6",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "car_wash": {
      "version": "1.5.5",
      "requirements": []
    },
    "syncthru": {
      "version": "0.2.0",
      "requirements": [
        "pysyncthru==0.7.10",
        "url-normalize==1.4.3"
      ]
    },
    "knmi": {
      "version": "1.6.1",
      "requirements": []
    },
    "ventoptimization": {
      "version": "0.5",
      "requirements": []
    },
    "worlds_air_quality_index": {
      "version": "1.0.2",
      "requirements": []
    },
    "feedparser": {
      "version": "0.1.11",
      "requirements": [
        "feedparser==6.0.10"
      ]
    },
    "places": {
      "version": "v2.5.2.1",
      "requirements": []
    },
    "luchtmeetnet": {
      "version": "0.0.3",
      "requirements": [
        "luchtmeetnet==0.0.2"
      ]
    },
    "sun2": {
      "version": "2.4.0",
      "requirements": []
    },
    "blitzortung": {
      "version": "1.0.1",
      "requirements": [
        "paho-mqtt>=1.5.0"
      ]
    },
    "hacs": {
      "version": "1.33.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "ics_calendar": {
      "version": "4.0.1",
      "requirements": [
        "ics>=0.7.2",
        "recurring_ical_events>=2.0.2",
        "icalendar>=5.0.4"
      ]
    },
    "met_next_6_hours_forecast": {
      "version": "v1.1.0",
      "requirements": []
    },
    "buienalarm": {
      "version": "1.9",
      "requirements": [
        "pybuienalarm==0.1.1"
      ]
    },
    "neerslag": {
      "version": "2022.07.07.1",
      "requirements": []
    },
    "chime_tts": {
      "version": "v0.7.5",
      "requirements": [
        "pydub"
      ]
    },
    "powercalc": {
      "version": "v1.9.6",
      "requirements": [
        "numpy>=1.21.1"
      ]
    },
    "p2000": {
      "version": "1.0.23",
      "requirements": [
        "feedparser"
      ]
    },
    "holidays": {
      "version": "1.9.6",
      "requirements": [
        "python-dateutil>=2.8.2",
        "holidays>=0.14.2"
      ]
    },
    "better_thermostat": {
      "version": "1.3.0",
      "requirements": []
    },
    "multiscrape": {
      "version": "6.5.0",
      "requirements": [
        "lxml==4.9.1",
        "beautifulsoup4==4.11.1"
      ]
    },
    "brandstofprijzen": {
      "version": "0.3.0",
      "requirements": [
        "beautifulsoup4==4.10.0"
      ]
    }
  },
  "integration_manifest": {
    "domain": "knmi",
    "name": "KNMI",
    "codeowners": [
      "@golles"
    ],
    "config_flow": true,
    "documentation": "https://github.com/golles/ha-knmi/blob/main/README.md",
    "iot_class": "cloud_polling",
    "issue_tracker": "https://github.com/golles/ha-knmi/issues",
    "version": "1.6.1",
    "is_built_in": false
  },
  "data": {
    "config_entry": {
      "entry_id": "df214dc5dd9e14a203c1c3c68634919e",
      "version": 1,
      "domain": "knmi",
      "title": "Thuis",
      "data": {
        "name": "Thuis",
        "latitude": "**REDACTED**",
        "longitude": "**REDACTED**",
        "api_key": "**REDACTED**"
      },
      "options": {},
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "unique_id": null,
      "disabled_by": null
    },
    "data": {
      "plaats": "Capelle aan den IJssel",
      "timestamp": "1698691997",
      "time": "30-10-2023 19:53",
      "temp": "10.5",
      "gtemp": "10.5",
      "samenv": "Lichte motregen",
      "lv": "93",
      "windr": "NNO",
      "windrgr": "22",
      "windms": "1",
      "winds": "1",
      "windk": "1.9",
      "windkmh": "3.6",
      "luchtd": "995.7",
      "ldmmhg": "747",
      "dauwp": "9",
      "zicht": "11",
      "verw": "Op steeds meer plaatsen regen",
      "sup": "07:31",
      "sunder": "17:20",
      "image": "buien",
      "d0weer": "bewolkt",
      "d0tmax": "14",
      "d0tmin": "9",
      "d0windk": "3",
      "d0windknp": "8",
      "d0windms": "4",
      "d0windkmh": "15",
      "d0windr": "ZO",
      "d0windrgr": "135",
      "d0neerslag": "8",
      "d0zon": "11",
      "d1weer": "halfbewolkt_regen",
      "d1tmax": "13",
      "d1tmin": "8",
      "d1windk": "2",
      "d1windknp": "6",
      "d1windms": "3",
      "d1windkmh": "11",
      "d1windr": "ZW",
      "d1windrgr": "225",
      "d1neerslag": "70",
      "d1zon": "30",
      "d2weer": "halfbewolkt_regen",
      "d2tmax": "15",
      "d2tmin": "8",
      "d2windk": "3",
      "d2windknp": "8",
      "d2windms": "4",
      "d2windkmh": "15",
      "d2windr": "Z",
      "d2windrgr": "180",
      "d2neerslag": "70",
      "d2zon": "10",
      "alarm": "0",
      "alarmtxt": ""
    }
  }
}

Additional information

No response

Seems that the forecast has the wrong date on it?

Did you read the instructions?

The problem

If I run the new service 'weather.get_forecast' on the knmi plugin I seem to get the dates from yesterday:

service: weather.get_forecast
data:
  type: daily
target:
  entity_id: weather.knmi_ley

It's Sat 23 Sep 9:30 at the moment and the results in the developer tools say:

forecast:
  - datetime: "2023-09-22T22:00:00+00:00"
    condition: partlycloudy
    templow: 11
    temperature: 17
    precipitation_probability: 50
    wind_bearing: 225
    wind_speed: 15
    wind_speed_bft: 3
    sun_chance: 23
  - datetime: "2023-09-23T22:00:00+00:00"
    condition: partlycloudy
    templow: 9
    temperature: 19
    precipitation_probability: 10
    wind_bearing: 180
    wind_speed: 11
    wind_speed_bft: 2
    sun_chance: 60
  - datetime: "2023-09-24T22:00:00+00:00"
    condition: partlycloudy

If I look at the code I don't see any way how this can happen but I thought I'd report it anyway.

I enabled debug logs, shall report back.

(oh and is it possible that the links and 'my systeminfo buttons' in the Issue:Bug Report form open in a new window?)

Integration version

1.6.0

Home Assistant version

core-2023.9.2

Python version

3.11.5

Home Assistant log

No response

Diagnostics

No response

Additional information

No response

Value dauwp can't be converted to class float

Did you read the instructions?

The problem

The custom component produces a warning when dauwp is not available.
The api returns: "dauwp": "onb." which cannot converted to float.

Integration version

1.6.1

Home Assistant version

core-2023.10.5

Python version

3.11.5

Home Assistant log

2023-10-29 07:41:32.569 WARNING (MainThread) [custom_components.knmi] Value dauwp can't be converted to <class 'float'>
2023-10-29 07:42:02.141 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 593, in state
numerical_value = float(value) # type:ignore[arg-type]
^^^^^^^^^^^^
ValueError: could not convert string to float: 'onb.'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 233, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 389, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 172, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 469, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 779, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 879, in _async_write_ha_state
state, attr = self._async_generate_attributes()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 820, in _async_generate_attributes
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 785, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 595, in state
raise ValueError(
ValueError: Sensor sensor.knmi_markelo_dauwpunt has device class 'temperature', state class 'measurement' unit '°C' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'onb.' (<class 'str'>)
2023-10-29 07:42:02.569 WARNING (MainThread) [custom_components.knmi] Value dauwp can't be converted to <class 'float'>

Diagnostics

No response

Additional information

No response

CONDITIONS_MAP is missing key halfbewolkt_regen

Version of the custom_component

1.0.2

Describe the bug

CONDITIONS_MAP is missing halfbewolkt_regen

Debug log

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 383, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 588, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 615, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 368, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 404, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/weather/__init__.py", line 180, in state_attributes
    if self.forecast is not None:
  File "/config/custom_components/knmi/weather.py", line 93, in forecast
    ATTR_FORECAST_CONDITION: CONDITIONS_MAP[
KeyError: 'halfbewolkt_regen'

Forecast 5 days

I've installed the KNMI integration but I only see 3 days (today, and the next 2 days). All other weather integrations show 5 days. I don't know if this is a limitation of the KNMI API?

When I visit the https://weerlive.nl/ website I get 5 days forecast. Is this something you can add/modify?

Value d1windrgr can't be converted to <class 'float'>

Did you read the instructions?

The problem

Since 01:26 this night, my log is overflown with the error in the subject. It's continiously happening until now.

What version of this integration has the issue?

1.3.4

What version of Home Assistant Core has the issue?

core-2022.11.4

Home Assistant log

2022-11-28 01:06:12.348 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:06:12.357 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:06:42.350 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:06:42.352 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:07:12.352 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:07:12.353 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:07:42.351 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:07:42.352 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:08:12.352 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:08:12.353 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:08:42.354 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:08:42.356 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:09:12.355 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:09:12.356 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:09:42.355 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:09:42.357 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:10:12.357 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:10:12.359 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:10:42.358 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:10:42.359 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:11:12.359 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:11:12.360 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:11:42.360 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:11:42.362 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:12:12.361 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:12:12.363 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:12:42.363 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:12:42.365 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:13:12.364 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:13:12.365 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:13:42.365 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:13:42.367 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:14:12.366 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:14:12.368 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:14:42.368 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:14:42.369 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:15:12.369 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:15:12.370 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:15:42.369 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:15:42.371 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:16:12.370 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:16:12.372 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:16:42.371 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:16:42.372 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:17:12.371 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:17:12.372 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:17:42.372 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:17:42.374 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:18:12.373 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:18:12.375 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:18:42.375 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:18:42.376 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:19:12.375 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:19:12.377 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:19:42.376 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:19:42.378 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:20:12.376 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:20:12.378 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:20:42.377 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:20:42.379 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:21:12.377 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:21:12.379 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:21:42.379 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:21:42.381 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:22:12.381 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:22:12.382 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:22:42.381 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:22:42.383 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:23:12.382 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:23:12.383 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:23:42.383 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:23:42.385 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:24:12.384 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:24:12.385 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:24:42.385 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:24:42.387 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:25:12.387 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:25:12.388 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:25:42.387 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:25:42.389 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:26:12.389 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:26:12.391 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:26:42.391 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:26:42.392 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:27:12.391 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:27:12.393 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:27:42.392 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:27:42.394 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:28:12.393 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:28:12.395 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:28:42.395 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:28:42.396 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:29:12.396 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:29:12.397 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:29:42.396 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:29:42.397 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:30:12.398 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:30:12.399 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:30:42.398 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:30:42.400 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:31:12.400 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:31:12.401 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:31:42.401 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:31:42.402 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:32:12.402 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>
2022-11-28 01:32:12.404 WARNING (MainThread) [custom_components.knmi] Value d1windrgr can't be converted to <class 'float'>

Diagnostics

No response

Additional information

I'm not even using this value actively.

Current contents of weather.knmi_home:

temperature: 7.5
temperature_unit: °C
humidity: 97
pressure: 1009.6
pressure_unit: hPa
wind_bearing: 180
wind_speed: 10.8
wind_speed_unit: km/h
visibility: 5
visibility_unit: km
precipitation_unit: mm
forecast:
  - datetime: '2022-11-27T23:00:00+00:00'
    condition: cloudy
    templow: 6
    temperature: 10
    precipitation_probability: 0
    wind_bearing: 225
    wind_speed: 11
    wind_speed_bft: 2
    sun_chance: 0
  - datetime: '2022-11-28T23:00:00+00:00'
    condition: cloudy
    templow: 4
    temperature: 8
    precipitation_probability: 30
    wind_bearing: null
    wind_speed: 7
    wind_speed_bft: 2
    sun_chance: 20
  - datetime: '2022-11-29T23:00:00+00:00'
    condition: cloudy
    templow: 5
    temperature: 7
    precipitation_probability: 30
    wind_bearing: 44
    wind_speed: 7
    wind_speed_bft: 2
    sun_chance: 10
attribution: KNMI Weergegevens via https://weerlive.nl

Support depreciated forecast attribute until 2024.3

Did you read the instructions?

The request

I see you updated the weather entity and are now using the new way to store the forecast data. However, I (and with me probably a lot of other people) are still using the old forecast attribute for templating.
For example, I have a template weather entity in which I combine an weather forecasts to an average one. This is currently not possible with the "hidden" forecasts.
So with the updated version of the KNMI weather entity, I'm unable to include it.

Therefor it would be nice if the old-style forecast could still be included until it is really removed in 2024.3

Additional information

No response

Error in logging

Seems version 1.0

I get after the last update this error in the log:
Logger: homeassistant.setup
Source: setup.py:316
First occurred: 21:02:24 (8 occurrences)
Last logged: 21:09:16

Unable to prepare setup for platform knmi.binary_sensor: Platform not found (cannot import name 'DeviceEntryType' from 'homeassistant.helpers.device_registry' (/usr/src/homeassistant/homeassistant/helpers/device_registry.py)).
Unable to prepare setup for platform knmi.weather: Platform not found (cannot import name 'DeviceEntryType' from 'homeassistant.helpers.device_registry' (/usr/src/homeassistant/homeassistant/helpers/device_registry.py)).
Unable to prepare setup for platform knmi.sensor: Platform not found (cannot import name 'DeviceEntryType' from 'homeassistant.helpers.device_registry' (/usr/src/homeassistant/homeassistant/helpers/device_registry.py)).

Debug log

Do you want me to deliver an debug log ?

Add your logs here.
Seems also an item is gone in the config
![image](https://user-images.githubusercontent.com/12442749/146689361-cccec0c8-5b60-4d26-9bc8-4d67210ddd28.png)

Regards
Eelco

VAR wind should not result in a direction of 0

Version of the custom_component

1.0.2

Describe the bug

A clear and concise description of what the bug is.
As a quick and dirty implementation I added direction 0 for VAR, this isn't correct.
API docs: de weergave VAR worden gebruikt, voor weinig wind uit variabele windrichtingen.

Debug log


N/A

DeviceEntryType error after upgrade to 1.1.4 version

The component doesn't work anymore after updating the component to version 1.1.4.

I'm running Home Assistant version 2021.11.0

Debug log

Logger: homeassistant.setup
Source: setup.py:316
First occurred: 08:06:32 (3 occurrences)
Last logged: 08:06:33

Unable to prepare setup for platform knmi.binary_sensor: Platform not found (cannot import name 'DeviceEntryType' from 'homeassistant.helpers.device_registry' (/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/device_registry.py)).
Unable to prepare setup for platform knmi.weather: Platform not found (cannot import name 'DeviceEntryType' from 'homeassistant.helpers.device_registry' (/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/device_registry.py)).
Unable to prepare setup for platform knmi.sensor: Platform not found (cannot import name 'DeviceEntryType' from 'homeassistant.helpers.device_registry' (/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/device_registry.py)).

Safe?

Did you read the instructions?

The problem

Hi,

Yesterday there was code yellow and orange.

In previous versions the status "safe" status changed. To my surprise this did not happen. Was I the only one with this observation?

I wonder weather this was expected behavior or did KNMI itself did not "toggle" a status somewhere?

Best regards,
Haaino

Integration version

1.5.0

Home Assistant version

HA 2.23.6.2

Python version

3.11

Home Assistant log

Hi,

Yesterday there was code yellow and orange.

In previous versions the status "safe" status changed. To my surprise this did not happen. Was I the only one with this observation?

I wonder weather this was expected behavior or did KNMI itself did not "toggle" a status somewhere?

Best regards,
Haaino

Diagnostics

No response

Additional information

No response

'utf-8' codec can't decode byte 0xeb in position 38: invalid continuation byte

Version of the knmi custom_component

VERSION = "1.0.6"

Describe the bug

Installed for the first time KNMI integration, with following error
(Entities could also NOT be created.)

Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.knmi
Source: custom_components/knmi/api.py:68
Integration: KNMI (documentation, issues)
First occurred: 00:52:54 (1 occurrences)
Last logged: 00:52:54

Something really wrong happened! - 'utf-8' codec can't decode byte 0xeb in position 38: invalid continuation byte

Debug log


Logger: homeassistant.components.weather
Source: custom_components/knmi/weather.py:35
Integration: Weather (documentation, issues)
First occurred: 00:53:00 (2 occurrences)
Last logged: 00:53:01

Error adding entities for domain weather with platform knmi
Error while setting up knmi platform for weather
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 447, in _async_add_entity
    suggested_object_id = entity.name  # type: ignore[unreachable]
  File "/config/custom_components/knmi/weather.py", line 35, in name
    location = self.coordinator.data["plaats"]
TypeError: 'NoneType' object is not subscriptable


weather.knmi_huis is using a forecast attribute on an instance of WeatherEntity

Did you read the instructions?

The problem

Logger: homeassistant.components.weather
Source: components/weather/init.py:339
Integration: Weer (documentation, issues)
First occurred: 10:12:35 (1 occurrences)
Last logged: 10:12:35

custom_components.knmi.weather::weather.knmi_huis is using a forecast attribute on an instance of WeatherEntity, this is deprecated and will be unsupported from Home Assistant 2024.3. Please report it to the custom integration author.

Integration version

1.5.0

Home Assistant version

core-2023.9.0b3

Python version

3.11.5

Home Assistant log

weather.knmi_huis is using a forecast attribute on an instance of WeatherEntity, this is deprecated and will be unsupported from Home Assistant 2024.3. Please report it to the custom integration author.

Diagnostics

No response

Additional information

No response

API Response Missing

Did you read the instructions?

The problem

Integration is throwing some errors updating to the latest version (1.3.7) using core 2023.2.3.

What version of this integration has the issue?

1.3.7

What version of Home Assistant Core has the issue?

2023.2.4

Home Assistant log

Deze fout is ontstaan door een aangepaste integratie.

: custom_components.knmi
Source: custom_components/knmi/__init__.py:117 
Integration: KNMI (documentation, issues) 
First occurred: 20:40:40 (13 occurrences) 
Last logged: 20:40:40

Value d2zon is missing in API response
Value plaats is missing in API response
Value samenv is missing in API response
Value verw is missing in API response
Value windkmh is missing in API response

Diagnostics

No response

Additional information

Not using HACS, just the custom component.

request for "gevoelstemperatuur"

Hi,
In the datastream coming from KNMI also a piece of data for "gevoelstemperatuur" is available.
As I am not quite known with merge requests, I kindly ask to take a look into the following addon:

In const.py to add in "SENSORS:"
{"name": "Gevoelstemp", "unit": "°C", "icon": "mdi:thermometer", "key": "gtemp"},

and in weather.py section "class KnmiWeather(KnmiEntity, WeatherEntity):"

@property
def gtemperature(self):
    """Return the temperature."""
    return float(self.coordinator.data["gtemp"])

@property
def gtemperature_unit(self):
    """Return the unit of measurement."""
    return TEMP_CELSIUS

This works for me quite well...

Thanks for looking.
Michel

Weerwaarschuwing niet ingeladen

Did you read the instructions?

The problem

Via de API komt er bij een weerwaarschuwing ook een txt door. De plugin neemt die niet over, geeft alleen bericht weer "Onveilig" terwijl in de API het volgende staat: "alarmtxt": "Vanaf halverwege de avond kan het in het midden en noorden van het land glad worden door bevriezing van natte weggedeelten. Vanaf het einde van de nacht gaat het in het zuiden enig tijd sneeuwen waardoor het ook daar plaatselijk glad kan worden. In de Limburgse heuvels kan meer dan 5 cm vallen. Woensdagmiddag is de gladheid tijdelijk voorbij. In de nacht naar donderdag kan het opnieuw plaatselijk glad worden door bevriezing van natte weggedeelten, in het zuiden van het land opnieuw door (natte) sneeuw. Verkeer en buitenactiviteiten hinder ondervinden van de gladheid."}]}

What version of this integration has the issue?

1.3.8

What version of Home Assistant Core has the issue?

2023.03.1

Home Assistant log

No response

Diagnostics

No response

Additional information

No response

Weather forecast always displays minimum temperature

Did you read the instructions?

The problem

The weather forecast always displays the minimum temperature instead of min/max.

image

Screenshot of KNMI website:

image

What version of this integration has the issue?

1.1.5

What version of Home Assistant Core has the issue?

2021.12.7

Home Assistant log

No response

Additional information

No response

Integration doesn’t automatically start after HA restart

Version of the custom_component

Configuration

Add your logs here.

Describe the bug

When I restart Home Assistant then the KNMI integration doesn’t seem to automatically start. After full restart of HA i have to manually start it with reloading the integration.

Debug log


Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/knmi/sensor.py", line 12, in async_setup_entry
    sensors.append(KnmiSensor(coordinator, entry, sensor["name"], sensor["unit"], sensor["icon"], sensor["key"]))
  File "/config/custom_components/knmi/sensor.py", line 25, in __init__
    self.location_name = self.coordinator.data["plaats"]
TypeError: 'NoneType' object is not subscriptable

‘NoneType' object has no attribute 'split'

Did you read the instructions?

The problem

meassistant
Source: custom_components/knmi/binary_sensor.py:142
Integration: KNMI (documentation, issues)
First occurred: 11 November 2022 at 16:17:50 (1 occurrences)
Last logged: 11 November 2022 at 16:17:50

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 151, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 348, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/binary_sensor/init.py", line 211, in state
if (is_on := self.is_on) is None:
File "/config/custom_components/knmi/binary_sensor.py", line 106, in is_on
sunrise = self.time_as_datetime(self.coordinator.get_value("sup"))
File "/config/custom_components/knmi/binary_sensor.py", line 142, in time_as_datetime
time_array = time.split(":")
AttributeError: 'NoneType' object has no attribute 'split'

What version of this integration has the issue?

1.3.0

What version of Home Assistant Core has the issue?

2022.11.2

Home Assistant log

No response

Diagnostics

No response

Additional information

No response

Reduce update frequency of plugin

Did you read the instructions?

The request

I'd like to reduce the update frequency of the plugin; I'm pretty much only interested in the forecast and I can't image that being update more than daily.

Additionally, I already have a weerlive API key in use for another project and I don't want to skirt the rules by requesting another API key for the same IP.

I saw an 'SCAN_INTERVAL' in const.py...

Additional information

No response

storm Ciarán

Did you read the instructions?

The problem

Hi,

I have no idea if this belongs here, but I see that storm Ciarán is spelled as storm Ciarán.

Somewhere there is some code mistranslated.

It could be markdown, knmi or anywhere else.

Integration version

1.6.1

Home Assistant version

Core 2023.9.4

Python version

3.11

Home Assistant log

No response

Diagnostics

No response

Additional information

No response

wolkennacht

Did you read the instructions?

The problem

Encountered the following in log file

What version of this integration has the issue?

1.3.3

What version of Home Assistant Core has the issue?

HA 2022.11.3

Home Assistant log

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/knmi/weather.py:103 
Integration: KNMI (documentation, issues) 
First occurred: 04:14:57 (480 occurrences) 
Last logged: 08:14:28

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 813, in _update_entity_states
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/components/weather/__init__.py", line 832, in state
    return self.condition
  File "/config/custom_components/knmi/weather.py", line 103, in condition
    return CONDITIONS_MAP[self.coordinator.get_value("image")]
KeyError: 'wolkennacht'

Diagnostics

No response

Additional information

No response

Adding forecast text

First of all thanks for this integration!

Is it possible to add the forecast text of 'weerlive'?
I would like to use it for pronouncing the weather forecast.
In the reply of the url it looks like:

"verw": "Enkele buien, vanavond in het noorden zware windstoten",

Thanks in advance
Regards,
Wouter

minimum verwachting is eigenlijk van gister

Did you read the instructions?

The problem

leuke integratie!
het viel me op dat in de knmi card de minimum temperatuur van afgelopen nacht staat, terwijl je denk ik juist zou willen zien wat het komende nacht gaat worden. Nu staat bv actuele temp van -3,5oC met daar onder 2oC -3oC terwijl bij de verwachting voor morgen -7 staat, wat het dus zo gaat worden.

What version of this integration has the issue?

1.3.5

What version of Home Assistant Core has the issue?

2022.12.6

Home Assistant log

No response

Diagnostics

No response

Additional information

No response

Weather alert sensor remains on

Version of the knmi custom_component

149697f

Describe the bug

The Weather Alert binary_sensor remains on while the KNMI website doesn't show an active alert anymore.
There was a fog alert in the morning but that was revoked during the day, but it still shows as active alert without attributes.

Debug log


N/A

adjust empty Waarschuwing attribute

Did you read the instructions?

The request

which currently is empty:

Scherm­afbeelding 2023-02-12 om 16 52 56

checking the KNMI api directly via a rest sensor returns:

Scherm­afbeelding 2023-02-12 om 16 54 32

which might be a nice addition to that entity?

Additional information

  - resource: https://cdn.knmi.nl/knmi/xml/rss/rss_KNMIwaarschuwingen.xml
    scan_interval: 900

    sensor:

#       - unique_id: knmi_waarschuwingen_
#         name: KNMI waarschuwingen
#         value_template: >
#           {{now()}}
#         json_attributes_path: '$.rss.channel'
#         json_attributes:
#           - item

      - unique_id: knmi_waarschuwingen_nb
        name: KNMI waarschuwingen NB
        value_template: >
          {{now()}}
        json_attributes_path: "$.rss.channel.item[?(@.title=='Waarschuwingen Noord-Brabant')]"
        json_attributes:
          - title
          - description
          - link
          - guid
          - pubDate
          - author

      - unique_id: knmi_waarschuwingen_basis
        name: KNMI waarschuwingen basis
        value_template: >
          {{now()}}
        json_attributes_path: "$.rss.channel.item[0]"
        json_attributes:
          - title
          - category
          - description
          - enclosure
          - link
          - guid
          - pubDate
          - author

use KNMI API instead of weerlive

Did you read the instructions?

The request

I'd just like to point out that the KNMI has an developer API at

https://developer.dataplatform.knmi.nl/apis

The documentation is fantastic and horrible at the same time, here are the available datasets for weather forecasts:

https://dataplatform.knmi.nl/group/weather-forecast

I've implemented the 'weather warnings' API for my job, it works quite nice. I have currently an open question if the usual forecasts are available over there.

https://dataplatform.knmi.nl/dataset/waarschuwingen-nederland-48h-1-0

Additional information

No response

Language parameter widgets

Did you read the instructions?

The request

It would be nice if you could add a language parameter so the language of HA itself can be different from the actual widgets.
I like my HA in English but my widgets in Dutch :)

Additional information

No response

Alarm always 1?

Did you read the instructions?

The problem

Hi,

Klopt het dat alarm altijd 1 is tenzij het hele land 'code groen' is? De twee bovenste steden hebben op het moment van schrijven geen weer alarm maar volgens ha-knmi wel. Klopt dit?

{ "liveweer": [{"plaats": "groningen", "temp": "7.9", "gtemp": "4.2", "samenv": "Geheel bewolkt", "lv": "81", "windr": "NW", "windrgr": "315", "windms": "7", "winds": "4", "windk": "13.6", "windkmh": "25.2", "luchtd": "1005.4", "ldmmhg": "754", "dauwp": "4", "zicht": "16", "verw": "Onstuimig met aan zee eerst nog een stormachtige wind, morgen minder wind", "sup": "08:16", "sunder": "17:17", "image": "bewolkt", "d0weer": "bewolkt", "d0tmax": "7", "d0tmin": "2", "d0windk": "4", "d0windknp": "14", "d0windms": "7", "d0windkmh": "26", "d0windr": "NW", "d0windrgr": "315", "d0neerslag": "4", "d0zon": "12", "d1weer": "regen", "d1tmax": "9", "d1tmin": "4", "d1windk": "3", "d1windknp": "10", "d1windms": "5", "d1windkmh": "19", "d1windr": "W", "d1windrgr": "270", "d1neerslag": "90", "d1zon": "10", "d2weer": "halfbewolkt", "d2tmax": "9", "d2tmin": "6", "d2windk": "3", "d2windknp": "8", "d2windms": "4", "d2windkmh": "15", "d2windr": "NW", "d2windrgr": "315", "d2neerslag": "40", "d2zon": "30", "alarm": "1", "alarmtxt": "De code oranje is beeindigd. Wel komen met uitzondering van het noordoosten van het land nog zware windstoten van 75-100 km/u voor, hiervoor is code geel van kracht. Hierdoor kan schade en gevaar ontstaan als gevolg van omvallende bomen en rondvliegende voorwerpen. De windstoten komen uit een noordwestelijke richting. In de loop van de middag neemt de wind geleidelijk af. Opgesteld door het KNMI op: maandag 31 januari 2022 12:06 uur EXTREEM WEER BEEINDIGD maandag 31 januari 2022 12:06 uur"}]}

{ "liveweer": [{"plaats": "Assen", "temp": "7.8", "gtemp": "3.8", "samenv": "Geheel bewolkt", "lv": "79", "windr": "NW", "windrgr": "315", "windms": "8", "winds": "5", "windk": "15.6", "windkmh": "28.8", "luchtd": "1005.6", "ldmmhg": "754", "dauwp": "4", "zicht": "19", "verw": "Onstuimig met aan zee eerst nog een stormachtige wind, morgen minder wind", "sup": "08:16", "sunder": "17:17", "image": "bewolkt", "d0weer": "bewolkt", "d0tmax": "7", "d0tmin": "2", "d0windk": "4", "d0windknp": "14", "d0windms": "7", "d0windkmh": "26", "d0windr": "NW", "d0windrgr": "315", "d0neerslag": "4", "d0zon": "12", "d1weer": "regen", "d1tmax": "9", "d1tmin": "4", "d1windk": "3", "d1windknp": "10", "d1windms": "5", "d1windkmh": "19", "d1windr": "W", "d1windrgr": "270", "d1neerslag": "90", "d1zon": "10", "d2weer": "halfbewolkt", "d2tmax": "9", "d2tmin": "6", "d2windk": "3", "d2windknp": "8", "d2windms": "4", "d2windkmh": "15", "d2windr": "NW", "d2windrgr": "315", "d2neerslag": "40", "d2zon": "30", "alarm": "1", "alarmtxt": "De code oranje is beeindigd. Wel komen met uitzondering van het noordoosten van het land nog zware windstoten van 75-100 km/u voor, hiervoor is code geel van kracht. Hierdoor kan schade en gevaar ontstaan als gevolg van omvallende bomen en rondvliegende voorwerpen. De windstoten komen uit een noordwestelijke richting. In de loop van de middag neemt de wind geleidelijk af. Opgesteld door het KNMI op: maandag 31 januari 2022 12:06 uur EXTREEM WEER BEEINDIGD maandag 31 januari 2022 12:06 uur"}]}

The two

{ "liveweer": [{"plaats": "utrecht", "temp": "5.8", "gtemp": "1.2", "samenv": "Lichte regen", "lv": "86", "windr": "NW", "windrgr": "315", "windms": "8", "winds": "5", "windk": "15.6", "windkmh": "28.8", "luchtd": "1010.4", "ldmmhg": "758", "dauwp": "3", "zicht": "6", "verw": "Onstuimig met aan zee eerst nog een stormachtige wind, morgen minder wind", "sup": "08:18", "sunder": "17:26", "image": "buien", "d0weer": "bewolkt", "d0tmax": "6", "d0tmin": "2", "d0windk": "5", "d0windknp": "17", "d0windms": "9", "d0windkmh": "31", "d0windr": "NW", "d0windrgr": "315", "d0neerslag": "8", "d0zon": "4", "d1weer": "regen", "d1tmax": "9", "d1tmin": "4", "d1windk": "3", "d1windknp": "10", "d1windms": "5", "d1windkmh": "19", "d1windr": "W", "d1windrgr": "270", "d1neerslag": "90", "d1zon": "10", "d2weer": "halfbewolkt", "d2tmax": "9", "d2tmin": "6", "d2windk": "3", "d2windknp": "8", "d2windms": "4", "d2windkmh": "15", "d2windr": "NW", "d2windrgr": "315", "d2neerslag": "40", "d2zon": "30", "alarm": "1", "alarmtxt": "De code oranje is beeindigd. Wel komen met uitzondering van het noordoosten van het land nog zware windstoten van 75-100 km/u voor, hiervoor is code geel van kracht. Hierdoor kan schade en gevaar ontstaan als gevolg van omvallende bomen en rondvliegende voorwerpen. De windstoten komen uit een noordwestelijke richting. In de loop van de middag neemt de wind geleidelijk af. Opgesteld door het KNMI op: maandag 31 januari 2022 12:06 uur EXTREEM WEER BEEINDIGD maandag 31 januari 2022 12:06 uur"}]}

{ "liveweer": [{"plaats": "nijmegen", "temp": "5.4", "gtemp": "1", "samenv": "Motregen en regen", "lv": "88", "windr": "NW", "windrgr": "315", "windms": "7", "winds": "4", "windk": "13.6", "windkmh": "25.2", "luchtd": "1010.0", "ldmmhg": "758", "dauwp": "3", "zicht": "5", "verw": "Onstuimig met aan zee eerst nog een stormachtige wind, morgen minder wind", "sup": "08:15", "sunder": "17:25", "image": "regen", "d0weer": "bewolkt", "d0tmax": "7", "d0tmin": "2", "d0windk": "5", "d0windknp": "17", "d0windms": "9", "d0windkmh": "31", "d0windr": "NW", "d0windrgr": "315", "d0neerslag": "8", "d0zon": "8", "d1weer": "regen", "d1tmax": "9", "d1tmin": "4", "d1windk": "3", "d1windknp": "10", "d1windms": "5", "d1windkmh": "19", "d1windr": "W", "d1windrgr": "270", "d1neerslag": "90", "d1zon": "10", "d2weer": "halfbewolkt", "d2tmax": "9", "d2tmin": "6", "d2windk": "3", "d2windknp": "8", "d2windms": "4", "d2windkmh": "15", "d2windr": "NW", "d2windrgr": "315", "d2neerslag": "40", "d2zon": "30", "alarm": "1", "alarmtxt": "De code oranje is beeindigd. Wel komen met uitzondering van het noordoosten van het land nog zware windstoten van 75-100 km/u voor, hiervoor is code geel van kracht. Hierdoor kan schade en gevaar ontstaan als gevolg van omvallende bomen en rondvliegende voorwerpen. De windstoten komen uit een noordwestelijke richting. In de loop van de middag neemt de wind geleidelijk af. Opgesteld door het KNMI op: maandag 31 januari 2022 12:06 uur EXTREEM WEER BEEINDIGD maandag 31 januari 2022 12:06 uur"}]}

What version of this integration has the issue?

1.1.6

What version of Home Assistant Core has the issue?

core-2021.12.10

Home Assistant log

No response

Additional information

No response

Error doing job: Task exception was never retrieved

Did you read the instructions?

The problem

I’m getting error messages in my log file concerning images that cannot be retrieved.

What version of this integration has the issue?

1.3.2

What version of Home Assistant Core has the issue?

HA 2022.11.3

Home Assistant log

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/knmi/weather.py:102 
Integration: KNMI (documentation, issues) 
First occurred: 11:13:21 (100 occurrences) 
Last logged: 13:02:51

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 813, in _update_entity_states
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/components/weather/__init__.py", line 832, in state
    return self.condition
  File "/config/custom_components/knmi/weather.py", line 102, in condition
    return CONDITIONS_MAP[self.coordinator.get_value("image")]
KeyError: 'lichtbewolkt'

Diagnostics

No response

Additional information

Home Assistant 2022.11.3
Supervisor 2022.10.2
Operating System 9.3
Frontend 20221108.0 - latest

Error in statistics

Did you read the instructions?

The problem

Hi,

I'm getting the following error messages in developer tools -> statistics for the entities: sensor.knmi_knmi_dauwpunt and sensor.knmi_knmi_gevoelstemperatuur


Unsupported state class in statistics

The state class of this entity, is not supported.
Statistics can not be generated until this entity has a supported state class.

If this state class was provided by an integration, this is a bug. Please report an issue.

If you have set this state class yourself, please correct it. The different state classes and when to use which can be found in the developer documentation.


Screenshot 2022-07-15 at 9 21 04

as a recorder I use MariaDB.

Perhaps I'm doing something, please let me know.

What version of this integration has the issue?

1.1.11

What version of Home Assistant Core has the issue?

2022.7.5

Home Assistant log

No response

Additional information

No response

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.