kalkih / simple-weather-card

Minimalistic weather card for Home Assistant
MIT License
289 stars 35 forks source link

anyway to change the weather icon (condition) #12

Closed rgogada closed 5 years ago

rgogada commented 5 years ago

I am from Australia and using BOM weather. Unfortunately the conditions they use are not complaint with HA conditions. eg: "Rain" instead of "rainy".

I have created an other template sensor to manipulate this condition to make it complaint with HA conditions but how can I override it on this card. I tried to set the custom state but it does not change the icon (does change the text though). anyway to change the icon? cheers.

kalkih commented 5 years ago

Not possible, could possibly add the ability to override the icon-state in the future, but imo the BOM component should be tweaked so that it follows the standard HA weather states

kflinderman commented 5 years ago

Is it possible to just get the icon to follow whatever the state value is? I'm trying to create a forecast card, and I'm using a custom sensor with tomorrow's weather condition, but it looks like the icon follows what the original condition is.

kalkih commented 5 years ago

You can now override the variable the icon-state is based on with a custom sensor.

# example
- type: custom:simple-weather-card
  entity: weather.smhi_home
  custom:
    - icon-state: sensor.custom_state_sensor

Here are all the available icon states:

Is it possible to just get the icon to follow whatever the state value is? I'm trying to create a forecast card, and I'm using a custom sensor with tomorrow's weather condition, but it looks like the icon follows what the original condition is.

Yes, this is now possible if you follow the example above.