Disable HA Dashboard pressure

Hi,
i am trying to clean up the weather widget of HA dashboard, leaving only the temperature information. Pressure and wind are not realy important here. Now i tried to remove “pressure” from the list of monitored_conditions in configuration.yaml, but this only leads to:
image

configuration.yaml:

Weather prediction

sensor:

  • platform: darksky
    language: de
    api_key: sdfsdfsdfsdf
    forecast:
    • 1
      monitored_conditions:
      • temperature
      • temperature_min
      • temperature_max
      • apparent_temperature
      • wind_speed
      • humidity
      • precip_probability
      • precip_intensity
      • wind_bearing
      • icon
      • precip_type
      • precip_intensity
      • precip_probability
      • precip_accumulation
      • daily_summary

.dash file:
sample_weather:
title: Weather
widget_type: weather
show_forecast: 1
prefer_icons: 1
forecast_title: Tomorrow
sensors:
weather_summary: sensor.dark_sky_daily_summary

Am i missing something?

Best regards

Yes you missed the instructions at the top of the page.

The docs are here, I suspect it has to do with your choice of sensors.

What do you mean, which page?

Sorry i forgot the link to the documentation, here you are:

http://appdaemon.readthedocs.io/en/latest/DASHBOARD_CREATION.html#weather

The link at the top of the page I was referring to is the one that says:

When posting logs or configuration snippets please use code blocks and syntax highlighting.

You mean “To use all the features you need to add these sensors to monitored_conditions”? Yes i did read that, that is why i removed “pressure”, in hopes to remove it from the “used features”. But it still tries to look for it, as you can see in the screenshot. Or do you mean something else?

It is really difficult to tell without seeing your .dash file properly.

Can you please properly format it.

Hey @DWST I think @nickrout got a bit confused about what you were trying to do.

I was having the same problem, and didn’t want a few of the arguments there too, pressure and wind didn’t really mean much to me either. So i just decided to try and work out how to get rid of them. Not sure if this is the correct way, I am sure @ReneTode will correct me if not, but this worked for me.

You need to find the install location for AppDaemon, for me this way in,

/srv/appdaemon/lib/python3.5/site-packages/appdaemon/

I am running Hassbian with it all in a venv, so your location may differ, I think, think, but am not 100% sure that the Hass.io location is,

/usr/local/lib/python3.5/dist-packages/appdaemon/

Then go into the

widgets/baseweather

folder, and edit the baseweather.html file, and remove this section,

<p class="secondary-detail" data-bind="visible: pressure() != ''">
<span class="secondary-icon mdi mdi-gauge" data-bind="visible: prefer_icons"></span>
<span class="secondary-info" data-bind="visible: !prefer_icons()">Pressure:&nbsp;</span>
<span class="secondary-info" data-bind="text: pressure"></span>
<span class="secondary-info" data-bind="text: pressure_unit, attr: {style: sub_unit_style}"></span>
</p>

Hit save, refresh your dashboard, and you should be good to go :+1:

dash

you are right @cee, ill correct you :wink:

if you want to manipulate widgets there is a better way. create a custom widget.
you do that like this:

  1. create a directory custom_widget in your configuration directory (where appdaemon.yaml is)
  2. copy the files from a widget that you want to manipulate to it and change the names from the files
    in this case the dir baseweather dir with its files and the weather.yaml for example change the name to myweather.
  3. inside the js file and the css file and the yaml file change all places where it says weather to myweather
  4. now you are ready to use your own custom weather widget so change widget_type in your dashboard widget to myweather.

if you do it that way, your widget will be there also when you update appdaemon (in your case it will get lost) but it is also possible for people working with docker or hassio.
for people that dont know where to find the original widgets on their system, go to:

@DWST did you also try the weather_summary?
i dont use weather but it has little info, and might be more wath you like.

1 Like

I knew this wasn’t quite the correct answer after I typed it, and actually thought about it a bit more. I guessed messing with the system files wasn’t the best practice, so was trying to do exactly what you mention as you replied,

But as I have said to you before @ReneTode my skills are a bit lacking, still learning more and more each day, but I was getting onto the right path, but just couldn’t quite figure it out in time before you beat me :slight_smile:

So yeah, ignore me @DWST and listen to the master @ReneTode :smiley:

1 Like

Ok, still learning, also new to Github, so hopefully this works. I have modified the weather widget for you @DWST and upload the code here,

So just copy of the weather_mod.yaml file, and baseweather_mod directory and contents to your custom_widgets folder in appdeamon folder. And then just add

weather:
  widget_type: weather_mod

to your dashboard, and you should be good to go with no pressure reported :slight_smile:

Maybe if you get a space second @ReneTode you could just double check this is all ok :+1:

you did upload the right files, so if it works for you it will normally also work for others.
dont forget to modify your readme.
add some info why you created it, what it is, what it does, what people need to do to get it working and a pic :wink:

1 Like

Wow thanks a lot Cee and ReneTode, sorry for the late response!
Will try the modded version this evening.

I saw some people having actual text like “It will rain in 2 hours”, “there is snow today”. (cannot find the screenshot right now). Did they use that “weather_summary”? Or is it also modded? Is weather_summary the widget_type?

Greetings

it is always helpfull to know that there is an very good documentation.
just looking at it can help you stop waiting for answers :wink:

http://appdaemon.readthedocs.io/en/latest/DASHBOARD_CREATION.html#widget-reference

but yeah weather_summery is the widget type.

i dont know if it is what you are looking for.
such actual text need to be in a sensor in home assistant.
so if you have that somewhere, you can have it in the dashboard.

Hi @Cee

Thanks for sharing this weather mod.
I’ve copied in the custom_widgets folder in appdeamon folder the weather_mod.yaml file, and baseweather_mod directory and its contents.
And modified my dashboard with

weather:
  widget_type: weather_mod

I get this widget

55

My darksky is

  - platform: darksky
    api_key: !secret darksky_api_key
    forecast:
      - 1
      - 2
    monitored_conditions:
      - summary
      - icon
      - nearest_storm_distance
      - apparent_temperature
      - pressure
      - precip_intensity
      - precip_probability
      - precip_intensity_max
      - humidity
      - wind_speed
      - wind_bearing
      - temperature
      - cloud_cover
      - precip_type
      - daily_summary
      - temperature_high
      - temperature_low

It seems it misses the apparent temp…

What about the Tomorrow forecast?

Should I add something in darksky sensor?

Thanks

to get forecast you need the show_forecast option in the widget.
see the docs for other options.

Thanks.

Now I have this in the dashboard yaml file

weather:
    widget_type: weather_mod
    units: auto
    show_forecast:
      - 1

Is it correct?

Now in the widgetI get a separate Rain value, but there is an error:
30

Strangely, I don’t have an entity sensor.dark_sky_daily_high_temperature_1 in the developer tools.
:open_mouth:

and thats why it says that.

in the docs you can find that you can specify which sensor should come on which place like:

  sensors:
    icon: sensor.dark_sky_icon
    temperature: sensor.dark_sky_temperature
    apparent_temperature: sensor.dark_sky_apparent_temperature
    humidity: sensor.dark_sky_humidity
    precip_probability: sensor.dark_sky_precip_probability
    precip_intensity: sensor.dark_sky_precip_intensity
    precip_type: sensor.dark_sky_precip
    pressure: sensor.dark_sky_pressure
    wind_speed: sensor.dark_sky_wind_speed
    wind_bearing: sensor.dark_sky_wind_bearing
    forecast_icon: sensor.dark_sky_icon_1
    forecast_temperature_min: sensor.dark_sky_daily_low_temperature_1
    forecast_temperature_max: sensor.dark_sky_daily_high_temperature_1
    forecast_precip_probability: sensor.dark_sky_precip_probability_1
    forecast_precip_type: sensor.dark_sky_precip_1

HA has changed the name from some sensors, so the default naming doesnt work anymore.
you need to use this part and on the right side give the names from the sensors you have.
i think there are 4 sensors that got another name.

Apologises @woody4165 that’s my fault. I was always getting the same reading for the apparent temperature to the normal temperature, so I removed that section as well. Seem’s i upload the file with the missing code. If you want to add it back in, just edit the baseweather.html file and on line 8 add in this code,

<div data-bind="attr: {style: sub_style}">
<p class="secondary-detail" data-bind="visible: apparent_temperature">
<span class="secondary-icon mdi mdi-thermometer-lines" title="Apparent Temp" data-bind="visible: prefer_icons"></span>
<span class="secondary-info" data-bind="visible: !prefer_icons()">Apparent Temp:&nbsp;</span>
<span class="secondary-info" data-bind="html: apparent_temperature"></span>
<span class="secondary-info" data-bind="html: unit, attr: {style: sub_unit_style}"></span>
</p> 

that should bring it back for you. If you have problems, just let me know, and i will reupload the file to gihub with the missing code in.

Thanks @ReneTode

where should I add these lines, in the yaml file where I have the weather widget?

Thanks @Cee

Now Apparent Temp is working, apart for the error and the missing forecast information

17

1 Like