Makin-Things / platinum-weather-card

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

Add a Caption or Label field for each of the custom entity slots #115

Open donburch888 opened 3 months ago

donburch888 commented 3 months ago

I live about halfway between the Port Kembla and Bellambi Aust. BOM observatories. Bellambi provides more data fields so I have set the primary entities to these; however I would like to also show some of the Port Kembla values.

The platinum weather card does not supply entities for all possible data - and how could it ? The Custom entities are the obvious way around this, however they display only an icon, data value and unit. In this image we see a temperature of 17.2 (custom entity 1), wind of 7 (custom entity 2), and rainfall 0.0mm (todays recorded rainfall) without any description to explain what they represent image

In this case custom entity 1 = current temperature at Port Kembla, custom entity 2 = wind of 7 km/h at Port Kembla, and rainfall 0.0mm = todays recorded rainfall.

Being able to add (or change) the label would make fields easier to understand. And Todays Recorded Rainfall (plus other issues raised) suggests that maybe it would be good to allow users to change the default values for other labels.
Eg: :temp icon: Port Kembla 17.2 :wind icon: Port kembla 7 km/h :rain icon: Todays recorded 0mm

donburch888 commented 3 months ago

I have found Screenshot from 2024-07-27 17-35-26 which requests entities for "Entity Temp Next Label" and "Entity Temp Following Label" where simple text labels are wanted.

Is the intention that we create dummy template entities, as suggested by alexdelprete at https://github.com/Makin-Things/platinum-weather-card/issues/94#issuecomment-1718506988

template:
  - sensor:
    # these are the text labels for the weather forcast card
    - name: "label for entity_temp_now"
      unique_id: label_entity_temp_now
      state: 'Next low/high'
    - name: "label for entity_temp_following"
      unique_id: label_entity_temp_following
      state: 'Follow low/high'

Is this the method for adding labels to the custom entity fields ? If so, what unique_id values do we need to use ?