Makin-Things / platinum-weather-card

This is a fully customisable weather card for Home Assistant with a graphical configuration.
MIT License
138 stars 33 forks source link

Observed/forecast min and max #74

Open degrepi opened 1 year ago

degrepi commented 1 year ago

Thanks for your awesome card, it's wonderful. However there is a problem on the Observed/forecast min-max As you can see the relative entity is right if alone, but not appear forecast min and max on the combined Thanks in advance, Pino

plat

DavidFW1960 commented 1 year ago

Your weather provider is not providing the info for max - check the entity in Home Assistant. This card can only display what Home Assistant provides.

degrepi commented 1 year ago

Yes he does. You can see it wit a red circle plat 2

degrepi commented 1 year ago

yes he does. It is in the red circle [image: plat 2.png]

Giuseppe De Gregorio M.D.

Piazza V. Cuoco, 2 – 86100 Campobasso (CB)

( : +39 329 0546168 - Tel/Fax: +39 0874 311805

@.***

: https://de-gregorio-dr-giuseppe.business.site/

Il giorno gio 22 dic 2022 alle ore 23:14 DavidFW1960 < @.***> ha scritto:

Your weather provider is not providing the info for max - check the entity in Home Assistant. This card can only display what Home Assistant provides.

— Reply to this email directly, view it on GitHub https://github.com/Makin-Things/platinum-weather-card/issues/74#issuecomment-1363395667, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2RN256OYYWSYENP2MTMBPDWOTHCPANCNFSM6AAAAAATGXVZSE . You are receiving this because you authored the thread.Message ID: @.***>

DavidFW1960 commented 1 year ago

The entity has no value in HA. Check in dev tools. The entity you are parsing to the card is n/a

degrepi commented 1 year ago

They are the same entity that give me the correct value on the card

[image: plat 3.png]

Giuseppe De Gregorio M.D.

Piazza V. Cuoco, 2 – 86100 Campobasso (CB)

( : +39 329 0546168 - Tel/Fax: +39 0874 311805

@.***

: https://de-gregorio-dr-giuseppe.business.site/

Il giorno ven 23 dic 2022 alle ore 09:22 DavidFW1960 < @.***> ha scritto:

The entity has no value in HA. Check in dev tools. The entity you are parsing to the card is n/a

— Reply to this email directly, view it on GitHub https://github.com/Makin-Things/platinum-weather-card/issues/74#issuecomment-1363727729, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2RN255ZPMQ6Z4L5NZZTIYLWOVOLRANCNFSM6AAAAAATGXVZSE . You are receiving this because you authored the thread.Message ID: @.***>

DavidFW1960 commented 1 year ago

They are the same entity that give me the correct value on the card

I very much doubt that. Can you post the yaml config of the card and screenshot your HA dev-tools states pages for your weather sensors.

degrepi commented 1 year ago

type: vertical-stack cards:

Il ven 23 dic 2022, 23:35 DavidFW1960 @.***> ha scritto:

They are the same entity that give me the correct value on the card

I very much doubt that. Can you post the yaml config of the card and screenshot your HA dev-tools states pages for your weather sensors.

— Reply to this email directly, view it on GitHub https://github.com/Makin-Things/platinum-weather-card/issues/74#issuecomment-1364368994, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2RN2527MS5MMJ7UW74EPQTWOYSMDANCNFSM6AAAAAATGXVZSE . You are receiving this because you authored the thread.Message ID: @.***>

DavidFW1960 commented 1 year ago

entity_forecast_max: weather.casa entity_observed_max: sensor.maxt

ok they are NOT the same entity and you have not given me a screenshot of your weather entities from dev-tools.

degrepi commented 1 year ago

I hope you want this one

Giuseppe De Gregorio M.D.

Piazza V. Cuoco, 2 – 86100 Campobasso (CB)

( : +39 329 0546168 - Tel/Fax: +39 0874 311805

@.***

: https://de-gregorio-dr-giuseppe.business.site/

Il giorno sab 24 dic 2022 alle ore 00:22 DavidFW1960 < @.***> ha scritto:

entity_forecast_max: weather.casa entity_observed_max: sensor.maxt

ok they are NOT the same entity and you have not given me a screenshot of your weather entities from dev-tools.

— Reply to this email directly, view it on GitHub https://github.com/Makin-Things/platinum-weather-card/issues/74#issuecomment-1364394592, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2RN252554XRT3TNURLGORDWOYX4FANCNFSM6AAAAAATGXVZSE . You are receiving this because you authored the thread.Message ID: @.***>

DavidFW1960 commented 1 year ago

No I want to see the states of the entities in dev-tools like this: image or image

degrepi commented 1 year ago

It's Open-Meteo integration

Giuseppe De Gregorio M.D.

Piazza V. Cuoco, 2 – 86100 Campobasso (CB)

( : +39 329 0546168 - Tel/Fax: +39 0874 311805

@.***

: https://de-gregorio-dr-giuseppe.business.site/

Il giorno dom 25 dic 2022 alle ore 23:43 DavidFW1960 < @.***> ha scritto:

No I want to see the states of the entities in dev-tools like this: [image: image] https://user-images.githubusercontent.com/36390762/209483604-fe7d8ff2-d358-4bee-9af1-ef5b63155a89.png or [image: image] https://user-images.githubusercontent.com/36390762/209483625-67a5fcf8-2ecb-4d73-aefd-d7b9bdb0119b.png

— Reply to this email directly, view it on GitHub https://github.com/Makin-Things/platinum-weather-card/issues/74#issuecomment-1364748231, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2RN25ZEQZJIJI5SCM3NAXTWPDEYPANCNFSM6AAAAAATGXVZSE . You are receiving this because you authored the thread.Message ID: @.***>

degrepi commented 1 year ago

maybe this can be useful, it's diagnostic

Giuseppe De Gregorio M.D.

Piazza V. Cuoco, 2 – 86100 Campobasso (CB)

( : +39 329 0546168 - Tel/Fax: +39 0874 311805

@.***

: https://de-gregorio-dr-giuseppe.business.site/

Il giorno lun 26 dic 2022 alle ore 08:08 Pino De Gregorio @.***> ha scritto:

It's Open-Meteo integration

Giuseppe De Gregorio M.D.

Piazza V. Cuoco, 2 – 86100 Campobasso (CB)

( : +39 329 0546168 - Tel/Fax: +39 0874 311805

@.***

: https://de-gregorio-dr-giuseppe.business.site/

Il giorno dom 25 dic 2022 alle ore 23:43 DavidFW1960 < @.***> ha scritto:

No I want to see the states of the entities in dev-tools like this: [image: image] https://user-images.githubusercontent.com/36390762/209483604-fe7d8ff2-d358-4bee-9af1-ef5b63155a89.png or [image: image] https://user-images.githubusercontent.com/36390762/209483625-67a5fcf8-2ecb-4d73-aefd-d7b9bdb0119b.png

— Reply to this email directly, view it on GitHub https://github.com/Makin-Things/platinum-weather-card/issues/74#issuecomment-1364748231, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2RN25ZEQZJIJI5SCM3NAXTWPDEYPANCNFSM6AAAAAATGXVZSE . You are receiving this because you authored the thread.Message ID: @.***>

"integration_manifest": { "domain": "open_meteo", "name": "Open-Meteo", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/open_meteo", "requirements": [ "open-meteo==0.2.1" ], "dependencies": [ "zone" ], "codeowners": [ @.*" ], "integration_type": "service", "iot_class": "cloud_polling", "is_built_in": true }, "data": { "current_weather": { "time": "2022-12-26T06:00:00", "wind_speed": 3.3, "wind_direction": 229, "temperature": 4.7, "weather_code": 3 }, "daily_units": { "apparent_temperature_max": null, "apparent_temperature_min": null, "precipitation_hours": null, "precipitation_sum": "mm", "shortwave_radiation_sum": null, "sunrise": null, "sunset": null, "temperature_2m_max": "\u00b0C", "temperature_2m_min": "\u00b0C", "time": "iso8601", "weather_code": "wmo code", "wind_direction_10m_dominant": "\u00b0", "wind_gusts_10m_max": null, "wind_speed_10m_max": "km/h" }, "daily": { "apparent_temperature_max": null, "apparent_temperature_min": null, "precipitation_hours": null, "precipitation_sum": [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], "shortwave_radiation_sum": null, "sunrise": null, "sunset": null, "temperature_2m_max": [ 13.8, 13.1, 11.8, 11.9, 14.0, 14.7, 14.9 ], "temperature_2m_min": [ 4.6, 3.7, 2.6, 2.8, 5.2, 6.9, 5.5 ], "time": [ "2022-12-26", "2022-12-27", "2022-12-28", "2022-12-29", "2022-12-30", "2022-12-31", "2023-01-01" ], "weathercode": [ 3, 3, 3, 1, 3, 3, 1 ], "wind_direction_10m_dominant": [ 213, 226, 217, 247, 239, 226, 224 ], "wind_gusts_10m_max": null, "wind_speed_10m_max": [ 10.1, 11.8, 6.1, 14.3, 21.9, 11.6, 9.4 ] }, "elevation": 688.0, "generation_time_ms": 1.0429620742797852, "hourly_units": null, "hourly": null, "latitude": "REDACTED", "longitude": "REDACTED**", "utc_offset_seconds": 0 } }

degrepi commented 1 year ago

It'a now meteo Card Thanks

Giuseppe De Gregorio M.D.

Piazza V. Cuoco, 2 – 86100 Campobasso (CB)

( : +39 329 0546168 - Tel/Fax: +39 0874 311805

@.***

: https://de-gregorio-dr-giuseppe.business.site/

Il giorno lun 26 dic 2022 alle ore 08:25 Pino De Gregorio @.***> ha scritto:

maybe this can be useful, it's diagnostic

Giuseppe De Gregorio M.D.

Piazza V. Cuoco, 2 – 86100 Campobasso (CB)

( : +39 329 0546168 - Tel/Fax: +39 0874 311805

@.***

: https://de-gregorio-dr-giuseppe.business.site/

Il giorno lun 26 dic 2022 alle ore 08:08 Pino De Gregorio < @.***> ha scritto:

It's Open-Meteo integration

Giuseppe De Gregorio M.D.

Piazza V. Cuoco, 2 – 86100 Campobasso (CB)

( : +39 329 0546168 - Tel/Fax: +39 0874 311805

@.***

: https://de-gregorio-dr-giuseppe.business.site/

Il giorno dom 25 dic 2022 alle ore 23:43 DavidFW1960 < @.***> ha scritto:

No I want to see the states of the entities in dev-tools like this: [image: image] https://user-images.githubusercontent.com/36390762/209483604-fe7d8ff2-d358-4bee-9af1-ef5b63155a89.png or [image: image] https://user-images.githubusercontent.com/36390762/209483625-67a5fcf8-2ecb-4d73-aefd-d7b9bdb0119b.png

— Reply to this email directly, view it on GitHub https://github.com/Makin-Things/platinum-weather-card/issues/74#issuecomment-1364748231, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2RN25ZEQZJIJI5SCM3NAXTWPDEYPANCNFSM6AAAAAATGXVZSE . You are receiving this because you authored the thread.Message ID: @.***>

ianpra commented 1 year ago

Hi,

I have also experienced this problem, although I think I know why (not sure if this is the same issue that the OP has).

I have a separate sensor entity for my Observed Max temp, as it is being generated from my own weather station.

If I have separate slots for Observed Max temp and Forecast Max Temp, and I configure both sensors separately in the card then both values are displayed correctly. However I would like to cut down the number of slots used, and so I tried selecting Observed/forecast max to combine both values in one slot. Now I get the Observed Max value, but not the Forecast Max value displayed (I get 'NaN' as per the original screenshot).

I think the reason is that the combined view is looking to get both the Observed and Forecast values as separate attributes from the same weather entity, rather than combining the values from the 2 separate entities?

I'm sure that I could get around this by creating my own Template Sensor that combines the 2 values into a single string and then display that as a custom entity.

This is a great card, and the flexibility to configure as I want through the GUI is brilliant. Thanks for all your hard work.

DavidFW1960 commented 1 year ago

It is using 2 different entities for me and works correctly. I don't use the weather entity though.

image image

image I do get NaN sometimes but only when the forecast entity from the provider is blank.

ianpra commented 1 year ago

This is what I get -

2023-01-04 23_52_14-Window

card_config_version: 8
entity_forecast_icon: weather.home_2
entity_forecast_max: weather.home_2
entity_forecast_min: weather.home_2
entity_observed_max: sensor.max_outside_temp
entity_observed_min: sensor.min_outside_temp
entity_summary: weather.home_2
entity_temperature: sensor.gw1100a_v2_2_0_outdoor_temperature
option_show_overview_decimals: true
option_today_rainfall_decimals: true
option_today_temperature_decimals: true
section_order:
  - overview
  - extended
  - slots
  - daily_forecast
show_section_daily_forecast: false
show_section_extended: false
show_section_overview: true
slot_l1: forecast_max
slot_l2: observed_max
slot_l3: temp_maximums
slot_l4: remove
slot_l5: remove
slot_l6: remove
slot_l7: remove
slot_l8: remove
slot_r1: forecast_min
slot_r2: observed_min
slot_r3: temp_minimums
slot_r4: remove
slot_r5: remove
slot_r6: remove
slot_r7: remove
slot_r8: remove
type: custom:platinum-weather-card

I'm using the AccuWeather integration -

2023-01-04 23_57_32-Window

2023-01-05 00_00_39-Window

2023-01-05 00_01_06-Window

DavidFW1960 commented 1 year ago

so the sensor says 9.8 and the card shows 13? That doesn't look right. You could use a Template sensor to create the forecast entity but you're right it does look like a bug. @Makin-Things will need to take a look at this.

degrepi commented 1 year ago

Yes, same problem. I think Ianpra is right observation. Let me know when and how you create your own Template Sensor that combines the 2 values into a single string Best regards

Giuseppe De Gregorio M.D.

Piazza V. Cuoco, 2 – 86100 Campobasso (CB)

( : +39 329 0546168 - Tel/Fax: +39 0874 311805

@.***

: https://de-gregorio-dr-giuseppe.business.site/

Il giorno mer 4 gen 2023 alle ore 21:34 Ian P @.***> ha scritto:

Hi,

I have also experienced this problem, although I think I know why (not sure if this is the same issue that the OP has).

I have a separate sensor entity for my Observed Max temp, as it is being generated from my own weather station.

If I have separate slots for Observed Max temp and Forecast Max Temp, and I configure both sensors separately in the card then both values are displayed correctly. However I would like to cut down the number of slots used, and so I tried selecting Observed/forecast max to combine both values in one slot. Now I get the Observed Max value, but not the Forecast Max value displayed (I get 'NaN' as per the original screenshot).

I think the reason is that the combined view is looking to get both the Observed and Forecast values as separate attributes from the same weather entity, rather than combining the values from the 2 separate entities?

I'm sure that I could get around this by creating my own Template Sensor that combines the 2 values into a single string and then display that as a custom entity.

This is a great card, and the flexibility to configure as I want through the GUI is brilliant. Thanks for all your hard work.

— Reply to this email directly, view it on GitHub https://github.com/Makin-Things/platinum-weather-card/issues/74#issuecomment-1371391276, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2RN254ANQYNR6U7BHDMO2DWQXNGXANCNFSM6AAAAAATGXVZSE . You are receiving this because you authored the thread.Message ID: @.***>

ianpra commented 1 year ago

so the sensor says 9.8 and the card shows 13? That doesn't look right. You could use a Template sensor to create the forecast entity but you're right it does look like a bug. @Makin-Things will need to take a look at this.

Hi David,

The values shown on the card are correct - 13 was the Forecast Max, and 9.6 was the current temp at that time.

Ian

ianpra commented 1 year ago

@degrepi

Let me know when and how you create your own Template Sensor that combines the 2 values into a single string

Here are my 2 template sensors for Max and Min temperatures...

template:
  - sensor:
    - name: observe_fcast_max_temp
      state: "Obs Max {{states('sensor.max_outside_temp')}}°C / Forecast ({{ state_attr('weather.home_2','forecast') [0]['temperature'] }}°C)"
      device_class: temperature
      unit_of_measurement: "°C"

  - sensor:
    - name: observe_fcast_min_temp
      state: "Obs Min {{states('sensor.min_outside_temp')}}°C / Forecast ({{ state_attr('weather.home_2','forecast') [0]['templow'] }}°C)"
      device_class: temperature
      unit_of_measurement: "°C"

2023-01-09 02_04_44-Window

Then I just add these 2 sensors as custom entities to the card... 2023-01-09 02_08_10-Window

Kind regards Ian

degrepi commented 1 year ago

Thank You very much

Giuseppe De Gregorio M.D.

Piazza V. Cuoco, 2 – 86100 Campobasso (CB)

( : +39 329 0546168 - Tel/Fax: +39 0874 311805

@.***

: https://de-gregorio-dr-giuseppe.business.site/

Il giorno lun 9 gen 2023 alle ore 03:10 Ian P @.***> ha scritto:

@degrepi https://github.com/degrepi

Let me know when and how you create your own Template Sensor that combines the 2 values into a single string

Here are my 2 template sensors for Max and Min temperatures...

template:

  • sensor:

    • name: observe_fcast_max_temp

      state: "Obs Max {{states('sensor.max_outside_temp')}}°C / Forecast ({{ state_attr('weather.home_2','forecast') [0]['temperature'] }}°C)"

      device_class: temperature

      unit_of_measurement: "°C"

  • sensor:

    • name: observe_fcast_min_temp

      state: "Obs Min {{states('sensor.min_outside_temp')}}°C / Forecast ({{ state_attr('weather.home_2','forecast') [0]['templow'] }}°C)"

      device_class: temperature

      unit_of_measurement: "°C"

[image: 2023-01-09 02_04_44-Window] https://user-images.githubusercontent.com/25880217/211231015-a91b23b4-6efd-41d4-8acb-78b0c68be148.png

Then I just add these 2 sensors as custom entities to the card... [image: 2023-01-09 02_08_10-Window] https://user-images.githubusercontent.com/25880217/211231171-8a249207-f268-4aa2-a44f-109378224fcc.png

Kind regards Ian

— Reply to this email directly, view it on GitHub https://github.com/Makin-Things/platinum-weather-card/issues/74#issuecomment-1375024102, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2RN2552XPMZJVCLX373CDDWRNXQRANCNFSM6AAAAAATGXVZSE . You are receiving this because you were mentioned.Message ID: @.***>

degrepi commented 1 year ago

Hi, as you can see, now it's quite perfect. Only a question: among the temperature numbers there is a point instead of a comma. Why?

Giuseppe De Gregorio M.D.

Piazza V. Cuoco, 2 – 86100 Campobasso (CB)

( : +39 329 0546168 - Tel/Fax: +39 0874 311805

@.***

: https://de-gregorio-dr-giuseppe.business.site/

Il giorno lun 9 gen 2023 alle ore 03:10 Ian P @.***> ha scritto:

@degrepi https://github.com/degrepi

Let me know when and how you create your own Template Sensor that combines the 2 values into a single string

Here are my 2 template sensors for Max and Min temperatures...

template:

  • sensor:

    • name: observe_fcast_max_temp

      state: "Obs Max {{states('sensor.max_outside_temp')}}°C / Forecast ({{ state_attr('weather.home_2','forecast') [0]['temperature'] }}°C)"

      device_class: temperature

      unit_of_measurement: "°C"

  • sensor:

    • name: observe_fcast_min_temp

      state: "Obs Min {{states('sensor.min_outside_temp')}}°C / Forecast ({{ state_attr('weather.home_2','forecast') [0]['templow'] }}°C)"

      device_class: temperature

      unit_of_measurement: "°C"

[image: 2023-01-09 02_04_44-Window] https://user-images.githubusercontent.com/25880217/211231015-a91b23b4-6efd-41d4-8acb-78b0c68be148.png

Then I just add these 2 sensors as custom entities to the card... [image: 2023-01-09 02_08_10-Window] https://user-images.githubusercontent.com/25880217/211231171-8a249207-f268-4aa2-a44f-109378224fcc.png

Kind regards Ian

— Reply to this email directly, view it on GitHub https://github.com/Makin-Things/platinum-weather-card/issues/74#issuecomment-1375024102, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2RN2552XPMZJVCLX373CDDWRNXQRANCNFSM6AAAAAATGXVZSE . You are receiving this because you were mentioned.Message ID: @.***>

degrepi commented 1 year ago

platinum

ianpra commented 1 year ago

Only a question: among the temperature numbers there is a point instead of a comma. Why?

My guess is that the sensor is storing the temperature with decimal point, and that normally when you display that as a numeric value in Lovelace, the system locale settings will replace the decimal point with a comma in the dashboard.

However my template sensor is extracting the values as-is and then creating a string value with the combined values. At this point 6.4 is now a string and not a numeric value, so when Lovelace is displaying it, it sees the dot as a full stop and not a decimal separator, and so it doesn't replace it with a comma.

I'm sure it would be possible to create a templae sensor that can extract the dot and replace it with a comma, but that is beyond my templating skills I'm afraid!!

ianpra commented 1 year ago

Also, can you re-open this issue, as there appears to be a bug which should be fixed at some point. My template sensor is a work-around rather than a final solution.

Thanks

Ian

Nexow91 commented 3 months ago

It is using 2 different entities for me and works correctly. I don't use the weather entity though.

image image

image I do get NaN sometimes but only when the forecast entity from the provider is blank.

what are integration u use for this ?