Weather Summary Icon Status

I wonder if instead of templating the icon you could try setting the entity_picture:?

Use one of the png weather icon sets that are available - some of which are already named appropriately - and then just did a substitution on the image name.

This set of icons might work… they’re on github and there are already mappings for forecast.io!

Hi! New here! I was looking to set up forcast.io. So i looked around on these forums and on github and ran into this and into this (https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/sensor/forecast.py)

I also went here (https://home-assistant.io/components/sensor.forecast/) and added this to my configuration.yaml.

But what about all that stuff on github? maybe im just not understanding what it is, but im pretty sure that stuff isnt supposed to be added to the configuration.yaml, but to its own file that can be called on, right?

Basically i need help from the bottom to the top, ha.

Any info that yall can share to shed some light on any of this is og great help!

Thanks!

What is the definition of “stuff” here?

Meaning im completely new and foreign to all of this so i know ill come off as stupid when trying to get help.

Basically when i look at this (https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/sensor/forecast.py) i have no clue what to do with all this code.

https://github.com/home-assistant/home-assistant is hosting the source code for Home Assistant.

You should start here: https://home-assistant.io/getting-started/

Ive done that and done the full set ups. I have device trackers running and my WeMo devices working through HA.

So i guess the questions becomes, if i want to add stuff i see on github to my HA, how do i edit the source code?

Check https://home-assistant.io/developers/

So i found this https://home-assistant.io/developers/frontend_add_card/

Which is basically what i want to do with all the weather information.

Any tips?

@ChazBolt if you want to have a weather card simply do this in configuration.yaml

#Step 1. Add Sensor


#################################################################
## Sensors
#################################################################
sensor:
- platform: forecast
  api_key: your registered key goes here
  monitored_conditions:
    - summary
    - humidity
    - temperature

#Step 2. Add your items to a Weather group


#################################################################
## Groups
#################################################################
group:
 Weather:
   - sensor.weather_summary
   - sensor.weather_temperature
   - sensor.weather_humidity

#Step 3. Customize sensor icons if you want


#################################################################
## Customize
#################################################################
  customize:
    sensor.weather_humidity:
      icon: mdi:water-percent
      friendly_name: humidity
    sensor.weather_temperature:
      icon: mdi:thermometer
      friendly_name: temperature
    sensor.weather_summary:
      friendly_name: summary

All of this is done configuration.yaml and end result is

2 Likes

I think that’s what @ChazBolt looking for but didn’t know how to ask. But don’t worry about looking stupid - the only stupid question is the one you didn’t ask! :grin:

I think you’ll find that the overwhelming majority of HA folks are friendly and helpful.

1 Like

This worked! Thank you so much! Ive added a few more weather things and changed their icons and now have it working beautifully.

On to automation based on presence…

EDIT: the thing i kept messing up was i didnt kno the “customize” part needed to be under the home assistant header :sweat_smile:

You’re welcome

Later on, you’ll learn that you can separate the configuration.yaml file into separate files and call them with include statements:

group: !include groups.yaml

It helps when your configs get complicated and makes it easier to trace errors. And you also don’t have to enumerate each instance, like sensor:, sensor2:, etc.

i actually just did this for my automations!\

im trying to progress quickly enough so that i dont become too much of annoyance to this forum lol.

Isn’t sooooo much easier when you get a an error?!? I love that…!

And don’t worry about asking questions. Worry about paying back.

That’s what I do when I get involved in an open source project. Every time I scan the forums and see a question I can answer, even if I have to research it first, I jump in. That way when I have a question of my own, chances are good that either someone I have helped or someone who saw me help will answer my questions. I dig the community as much as a the software.

1 Like

Same. i just feel a bit useless bc im still at the point of asking “how to codez?” level questions.

but i guess that comes with time

Of course. But it seems to come fast here.

BTW, if you follow the Twitter feed, check out the Pycon presentation that @balloob (Paulus) did. I wanted to watch it just to see him speak; I thought it would all be over my head. But in reality it is a great explanation of just how HA works. I really felt like I learned a great deal from watching it and only one or two things made me have to pause and Google. He really did an awesome job.

Hi, i’ve been reading the topic, but I’m not sure I get it all. Is it possible to display an icon thats shows the current weather? Without the stuff all the weater-cards show. Need only the Icon…

Apparently not… …but here is a fix for you :slight_smile:
just created a Dark Sky icon sensor converter that converts Dark Sky icon to an actual mdi icon. It uses built in material icons from home assistant. If you are not using dark sky it shouldn’t be hard reengineering this template:

For this to work make sure you are pulling icon state from Dark Sky as follows

- platform: darksky
  api_key: !secret darkskyapi
  forecast:
  - 0
  monitored_conditions:
  - icon

Add this to your sensors config. This will create a sensor called sensor.weather_just_icon it will have an mdi icon of current weather and will output the name of it as state

- platform: template
  sensors:
    weather_just_icon:
      friendly_name: "mdi Real Weather Icon"
      icon_template: >-
          {% if is_state("sensor.dark_sky_icon","clear-day") %} mdi:weather-sunny 
          {% elif is_state("sensor.dark_sky_icon","clear-night") %} mdi:weather-night 
          {% elif is_state("sensor.dark_sky_icon","rain") %} mdi:weather-rainy
          {% elif is_state("sensor.dark_sky_icon","snow") %} mdi:weather-snowy
          {% elif is_state("sensor.dark_sky_icon","fog") %} mdi:weather-fog
          {% elif is_state("sensor.dark_sky_icon","sleet") %} mdi:weather-partly-snowy-rainy
          {% elif is_state("sensor.dark_sky_icon","wind") %} mdi:weather-windy
          {% elif is_state("sensor.dark_sky_icon","cloudy") %} mdi:weather-cloudy
          {% elif is_state("sensor.dark_sky_icon","partly-cloudy-day") %} mdi:weather-partly-cloudy
          {% elif is_state("sensor.dark_sky_icon","partly-cloudy-night") %} mdi:weather-night-partly-cloudy
          {% elif is_state("sensor.dark_sky_icon","hail") %} mdi:weather-hail
          {% elif is_state("sensor.dark_sky_icon","lightning") %} mdi:weather-lightning
          {% elif is_state("sensor.dark_sky_icon","thunderstorm") %} mdi:weather-lightning-rainy
          {% endif %}
     # entity_id: sensor.dark_sky_icon
      value_template: >-
          {% if is_state("sensor.dark_sky_icon","clear-day") %} weather-sunny 
          {% elif is_state("sensor.dark_sky_icon","clear-night") %} weather-night 
          {% elif is_state("sensor.dark_sky_icon","rain") %} weather-rainy
          {% elif is_state("sensor.dark_sky_icon","snow") %} weather-snowy
          {% elif is_state("sensor.dark_sky_icon","fog") %} weather-fog
          {% elif is_state("sensor.dark_sky_icon","sleet") %} weather-partly-snowy-rainy
          {% elif is_state("sensor.dark_sky_icon","wind") %} weather-windy
          {% elif is_state("sensor.dark_sky_icon","cloudy") %} weather-cloudy
          {% elif is_state("sensor.dark_sky_icon","partly-cloudy-day") %} weather-partly-cloudy
          {% elif is_state("sensor.dark_sky_icon","partly-cloudy-night") %} weather-night-partly-cloudy
          {% elif is_state("sensor.dark_sky_icon","hail") %} weather-hail
          {% elif is_state("sensor.dark_sky_icon","lightning") %} weather-lightning
          {% elif is_state("sensor.dark_sky_icon","thunderstorm") %} weather-lightning-rainy
          {% endif %}
3 Likes