Skip to content
This repository was archived by the owner on Dec 29, 2024. It is now read-only.
This repository was archived by the owner on Dec 29, 2024. It is now read-only.

Alert sensor is not parsing data correctly #63

Description

@Anwen747

I recently updated to version 1.0.8 of the integration from an older version (pre 1.0). Today for the first time since I updated, an alert came up. The sensor for the alerts is not parsing the data correctly. I have description_english and description_local in the attributes. I am not sure why there are two description attributes as there is only one description field in the provided data.

Description string in original source data (shortened and with location redacted):

"description": "A period of snow will overspread xxxx xxxxx late\ntonight and early Thursday morning. Precipitation will likely be\nin the form of mainly rain [continues on, for several more sentences.]

In sensor.weatherbit_weather_alerts (with location redacted but not otherwise changed):

description_english: onight and early Thursday morning. Precipitation will likely be
description_local: ' period of snow will overspread xxxx xxxxx late'

In other words,

description_local is giving me the first several words of the description string. missing the first character. The string starts and ends with single quotes.

description_english is giving me several words of the description string continuing from where description_local left off, also missing a first character. The rest of the description (which is most of it) is missing. There are no quotation marks at the start or end of the string.

It looks as though the /n characters in the original string may be part of the problem. I have saved the the full text of the original data and a screenshot of the sensor.weatherbit_weather_alerts information from Developer-States in Home Assistant, if that would be helpful to you. I do not want to post it here as it contains personal information.

I see from the other open issue that you are unavailable for a time, so I am aware there will be a delay in your looking at this issue. Congratulations on your new home.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions