Yep. It is. Sign-direction.
mdi hasn’t got anything closer to the pic above though. Unless you would know of anything better?
We could file a request at mdi’s
Yep. It is. Sign-direction.
mdi hasn’t got anything closer to the pic above though. Unless you would know of anything better?
We could file a request at mdi’s
I like tailwind for the knots
I like that. Will change to this on the next release.
This might already exist and I can’t find it, but is there an individual sensor that provides the “chance of rain”?
No this is not defined as an individual sensor. But on each Forecast Day … sensor, this is shown as an attribute., so it can be extracted using a template sensor.
HI,
talking about those forecast sensors, as you can see here, the forecast condition (weather text) is translated in the more-info window, but not on the individual sensors’s state:
more-info:
Hi Marius,
The state has to be en english, as it is the state that determines what Icon to use, so this is limited to the words defined in Home Assistant. To get local language text, you have to use the Attribute.
Attributes per definition don’t have units, and it cannot be added per default. The only thing I could do would be to convert the values to strings and then manually add the units to that string before they are written to the Attribute. But that then might create problems for people who use the values for some automations and/or calculations, so I will not do that.
understand. guess I was confused by this:
no worries, working fine as it is, (apart from the occasional server disconnect this service seems to suffer)
fine work!
Understand your confusion - The Weather Card is special, and honestly I am not quite sure how they do that, as the attributes per day (If you go to the developer tools) are without units. I will take a look when I have time.
Hi Can you explain how I can display the 5-day weather forecast instead of one particular day with one entity id?
Well, not so simple… I created very much nested card from these individual sensors, that resembles somehow typical weather card:
Here is the full code for this card:
cards:
- cards:
- cards:
- cards:
- content: >-
## {{ (as_timestamp(now()) ) | timestamp_custom('%b %-d, %Y')
}}
# <font color="#ffffff">{{ states('sensor.temp') }} °C</font>
## <font color="#ffffff">{{ states('sensor.condition')
}}</font>
style: |
ha-card {
text-align: left;
margin-right:5px
}
type: markdown
- aspect_ration: 1/1
entity: sensor.condition
show_name: false
show_state: false
size: 110px
tap_action:
action: none
type: 'custom:button-card'
- content: >-
<font color="#9193ab"><ha-icon
icon="mdi:map"></ha-icon></font> Zielonka
<font color="#9193ab"><ha-icon
icon="mdi:thermometer-high"></ha-icon><font color="#ffaa2e">{{
states('sensor.temp_max_0') }} °C</font>
<font color="#9193ab"><ha-icon
icon="mdi:thermometer-low"></ha-icon><font color="#ffffff">{{
states('sensor.temp_min_0') }} °C</font>
<font color="#9193ab"><ha-icon
icon="mdi:water-outline"></ha-icon><font color="#1bbfff">{{
states('sensor.precip_0') }} mm</font>
style: |
ha-card {
text-align: left;
margin-left:35px
}
type: markdown
horizontal: true
type: 'custom:vertical-stack-in-card'
- card:
cards:
- text: Weather Alert
type: 'custom:text-divider-row'
- content: >
## <font color={{ state_attr('sensor.weather_alert','color')
}}><ha-icon icon="mdi:alert"></ha-icon> {{
states('sensor.weather_alert') }}
{{ state_attr('sensor.weather_alert','alert') }}</font>
type: markdown
type: 'custom:vertical-stack-in-card'
conditions:
- entity: sensor.weather_alert
state_not: No Weather Alerts
type: conditional
- cards:
- content: >
<font color="#9193ab"><ha-icon
icon="mdi:water-percent"></ha-icon></font> {{
states('sensor.netatmo_pogodynka_ogrod_humidity') }} %
<font color="#9193ab"><ha-icon
icon="mdi:gauge"></ha-icon></font> {{
states('sensor.netatmo_pogodynka_parter_pressure') }} mbar
style: |
ha-card {
padding-left: 10px;
}
type: markdown
- content: >
<font color="#9193ab"><ha-icon
icon="mdi:weather-sunset-up"></ha-icon></font> {{
as_timestamp(state_attr('sensor.weatherbit_solar_radiation',
'sunrise')) | timestamp_custom('%H:%M')}}
<font color="#9193ab"><ha-icon
icon="mdi:weather-sunset-down"></ha-icon></font> {{
as_timestamp(state_attr('sensor.weatherbit_solar_radiation',
'sunset')) | timestamp_custom('%H:%M')}}
style: |
ha-card {
padding-left: 35px;
}
type: markdown
- content: >
<font color="#9193ab"><ha-icon icon=" {% set dir =
states('sensor.weatherbit_wind_bearing') | float %} {% if dir
< 22.5 %} mdi:arrow-down {% elif dir < 67.5 %}
mdi:arrow-bottom-left {% elif dir < 112.5 %} mdi:arrow-left {%
elif dir < 157.5 %} mdi:arrow-top-left {% elif dir < 202.5 %}
mdi:arrow-up {% elif dir < 247.5 %} mdi:arrow-top-right {%
elif dir < 292.5 %} mdi:arrow-right {% elif dir < 337.5 %}
mdi:arrow-bottom-right {% else %} mdi:arrow-down {% endif %}
"></ha-icon></font> {{
states('sensor.weatherbit_wind_direction') }}
<font color="#9193ab"><ha-icon
icon="mdi:gauge"></ha-icon></font> {{
states('sensor.weatherbit_wind_speed') }} m/s
style: |
ha-card {
padding-left: 35px;
}
type: markdown
horizontal: true
type: 'custom:vertical-stack-in-card'
- text: Weather Forecast
type: 'custom:text-divider-row'
- cards:
- cards:
- cards:
- content: >-
### <center>{{ (as_timestamp(now()) + 1*86400) |
timestamp_custom('%a') }}</center>
style: |
ha-card {
height: 50px;
}
type: markdown
- entity: sensor.condition_1
show_name: false
show_state: false
size: 50px
style: |
ha-card {
height: 50px;
}
tap_action:
action: none
type: 'custom:button-card'
- content: >-
<font color="#9193ab"><ha-icon
icon="mdi:thermometer-high"></ha-icon><font
color="#ffaa2e">{{ states('sensor.temp_max_1') }}
°C</font>
<font color="#9193ab"><ha-icon
icon="mdi:thermometer-low"></ha-icon><font
color="#ffffff">{{ states('sensor.temp_min_1') }}
°C</font>
<font color="#9193ab"><ha-icon
icon="mdi:water-outline"></ha-icon><font
color="#1bbfff">{{ states('sensor.precip_1')
}} mm</font>
style: |
ha-card {
height: 100px;
width: 120px
}
type: markdown
type: 'custom:vertical-stack-in-card'
- cards:
- content: >-
### <center>{{ (as_timestamp(now()) + 2*86400) |
timestamp_custom('%a') }}</center>
style: |
ha-card {
height: 50px;
}
type: markdown
- entity: sensor.condition_2
show_name: false
show_state: false
size: 50px
style: |
ha-card {
height: 50px;
}
tap_action:
action: none
type: 'custom:button-card'
- content: >-
<font color="#9193ab"><ha-icon
icon="mdi:thermometer-high"></ha-icon><font
color="#ffaa2e">{{ states('sensor.temp_max_2') }}
°C</font>
<font color="#9193ab"><ha-icon
icon="mdi:thermometer-low"></ha-icon><font
color="#ffffff">{{ states('sensor.temp_min_2') }}
°C</font>
<font color="#9193ab"><ha-icon
icon="mdi:water-outline"></ha-icon><font
color="#1bbfff">{{ states('sensor.precip_2')
}} mm</font>
style: |
ha-card {
height: 100px;
width: 120px
}
type: markdown
type: 'custom:vertical-stack-in-card'
- cards:
- content: >-
### <center>{{ (as_timestamp(now()) + 3*86400) |
timestamp_custom('%a') }}</center>
style: |
ha-card {
height: 50px;
}
type: markdown
- entity: sensor.condition_3
show_name: false
show_state: false
size: 50px
style: |
ha-card {
height: 50px;
}
tap_action:
action: none
type: 'custom:button-card'
- content: >-
<font color="#9193ab"><ha-icon
icon="mdi:thermometer-high"></ha-icon><font
color="#ffaa2e">{{ states('sensor.temp_max_3') }}
°C</font>
<font color="#9193ab"><ha-icon
icon="mdi:thermometer-low"></ha-icon><font
color="#ffffff">{{ states('sensor.temp_min_3') }}
°C</font>
<font color="#9193ab"><ha-icon
icon="mdi:water-outline"></ha-icon><font
color="#1bbfff">{{ states('sensor.precip_3')
}} mm</font>
style: |
ha-card {
height: 100px;
width: 120px
}
type: markdown
type: 'custom:vertical-stack-in-card'
- cards:
- content: >-
### <center>{{ (as_timestamp(now()) + 4*86400) |
timestamp_custom('%a') }}</center>
style: |
ha-card {
height: 50px;
}
type: markdown
- entity: sensor.condition_4
show_name: false
show_state: false
size: 50px
style: |
ha-card {
height: 50px;
}
tap_action:
action: none
type: 'custom:button-card'
- content: >-
<font color="#9193ab"><ha-icon
icon="mdi:thermometer-high"></ha-icon><font
color="#ffaa2e">{{ states('sensor.temp_max_4') }}
°C</font>
<font color="#9193ab"><ha-icon
icon="mdi:thermometer-low"></ha-icon><font
color="#ffffff">{{ states('sensor.temp_min_4') }}
°C</font>
<font color="#9193ab"><ha-icon
icon="mdi:water-outline"></ha-icon><font
color="#1bbfff">{{ states('sensor.precip_4')
}} mm</font>
style: |
ha-card {
height: 100px;
width: 120px
}
type: markdown
type: 'custom:vertical-stack-in-card'
- cards:
- content: >-
### <center>{{ (as_timestamp(now()) + 5*86400) |
timestamp_custom('%a') }}</center>
style: |
ha-card {
height: 50px;
}
type: markdown
- entity: sensor.condition_5
show_name: false
show_state: false
size: 50px
style: |
ha-card {
height: 50px;
}
tap_action:
action: none
type: 'custom:button-card'
- content: >-
<font color="#9193ab"><ha-icon
icon="mdi:thermometer-high"></ha-icon><font
color="#ffaa2e">{{ states('sensor.temp_max_5') }}
°C</font>
<font color="#9193ab"><ha-icon
icon="mdi:thermometer-low"></ha-icon><font
color="#ffffff">{{ states('sensor.temp_min_5') }}
°C</font>
<font color="#9193ab"><ha-icon
icon="mdi:water-outline"></ha-icon><font
color="#1bbfff">{{ states('sensor.precip_5')
}} mm</font>
style: |
ha-card {
height: 100px;
width: 120px;
}
type: markdown
type: 'custom:vertical-stack-in-card'
horizontal: true
type: 'custom:vertical-stack-in-card'
horizontal: true
type: 'custom:vertical-stack-in-card'
type: 'custom:vertical-stack-in-card'
- text: Outside conditions
type: 'custom:text-divider-row'
- cards:
- align_icon: left
animate: true
entities:
- entity: sensor.netatmo_pogodynka_ogrod_temperature
index: 0
font_size: 75
hour24: true
hours_to_show: 24
line_color: var(--greenish)
line_width: 3
name: Temperature
show:
extrema: true
fill: fade
icon: false
name: false
type: 'custom:mini-graph-card'
- align_icon: left
animate: true
entities:
- entity: sensor.netatmo_pogodynka_ogrod_humidity
index: 0
font_size: 75
hour24: true
hours_to_show: 24
line_color: var(--cyanish)
line_width: 3
name: Humidity
show:
extrema: true
fill: fade
icon: false
name: false
type: 'custom:mini-graph-card'
- align_icon: left
animate: true
entities:
- entity: sensor.netatmo_pogodynka_parter_pressure
index: 0
font_size: 75
hour24: true
hours_to_show: 24
line_color: var(--light-magenta)
line_width: 3
name: Presure
show:
extrema: true
fill: fade
icon: false
name: false
type: 'custom:mini-graph-card'
type: horizontal-stack
title: ''
type: 'custom:vertical-stack-in-card'
- cards:
- text: Outside vs. Inside Temperature
type: 'custom:text-divider-row'
- align_icon: left
animate: true
entities:
- color: var(--greenish)
entity: sensor.netatmo_pogodynka_ogrod_temperature
- color: var(--light-magenta)
entity: sensor.netatmo_pogodynka_parter_temperature
- color: var(--cyanish)
entity: sensor.day_night
show_line: false
y_axis: secondary
hour24: true
hours_to_show: 120
line_width: 1
name: Temperature
show:
extrema: false
fill: fade
icon: false
legend: false
name: false
points: false
state: false
type: 'custom:mini-graph-card'
- cards:
- content: >
<center><font color = magenta>Inside: {{
states('sensor.netatmo_pogodynka_parter_temperature') }}
°C</center>
type: markdown
- content: >
<center><font color = var(--greenish)cyan>Outside: {{
states('sensor.netatmo_pogodynka_ogrod_temperature') }}
°C</center>
type: markdown
mode: horizontal
type: 'custom:stack-in-card'
type: 'custom:vertical-stack-in-card'
- break
- cards:
- cards:
- text: Attic
type: 'custom:text-divider-row'
- cards:
- align_icon: left
animate: true
entities:
- entity: sensor.netatmo_pogodynka_tv_room_temperature
index: 0
font_size: 75
hour24: true
hours_to_show: 24
line_color: var(--greenish)
line_width: 3
name: Temperature
show:
extrema: true
fill: fade
icon: false
name: false
type: 'custom:mini-graph-card'
- align_icon: left
animate: true
entities:
- entity: sensor.netatmo_pogodynka_tv_room_humidity
index: 0
font_size: 75
hour24: true
hours_to_show: 24
line_color: var(--cyanish)
line_width: 3
name: Humidity
show:
extrema: true
fill: fade
icon: false
name: false
type: 'custom:mini-graph-card'
- align_icon: left
animate: true
entities:
- entity: sensor.netatmo_pogodynka_tv_room_co2
index: 0
font_size: 75
hour24: true
hours_to_show: 24
line_color: var(--light-magenta)
line_width: 3
name: CO2
show:
extrema: true
fill: fade
icon: false
name: false
type: 'custom:mini-graph-card'
horizontal: true
type: 'custom:vertical-stack-in-card'
type: 'custom:vertical-stack-in-card'
- cards:
- text: Bedroom
type: 'custom:text-divider-row'
- cards:
- align_icon: left
animate: true
entities:
- entity: sensor.netatmo_pogodynka_sypialnia_temperature
index: 0
font_size: 75
hour24: true
hours_to_show: 24
line_color: var(--greenish)
line_width: 3
name: Temperature
show:
extrema: true
fill: fade
icon: false
name: false
type: 'custom:mini-graph-card'
- align_icon: left
animate: true
entities:
- entity: sensor.netatmo_pogodynka_sypialnia_humidity
index: 0
font_size: 75
hour24: true
hours_to_show: 24
line_color: var(--cyanish)
line_width: 3
name: Humidity
show:
extrema: true
fill: fade
icon: false
name: false
type: 'custom:mini-graph-card'
- align_icon: left
animate: true
entities:
- entity: sensor.netatmo_pogodynka_sypialnia_co2
index: 0
font_size: 75
hour24: true
hours_to_show: 24
line_color: var(--light-magenta)
line_width: 3
name: CO2
show:
extrema: true
fill: fade
icon: false
name: false
type: 'custom:mini-graph-card'
horizontal: true
type: 'custom:vertical-stack-in-card'
type: 'custom:vertical-stack-in-card'
- cards:
- text: Ground Floor
type: 'custom:text-divider-row'
- cards:
- align_icon: left
animate: true
entities:
- entity: sensor.netatmo_pogodynka_parter_temperature
index: 0
font_size: 75
hour24: true
hours_to_show: 24
line_color: var(--greenish)
line_width: 3
name: Temperature
show:
extrema: true
fill: fade
icon: false
name: false
type: 'custom:mini-graph-card'
- align_icon: left
animate: true
entities:
- entity: sensor.netatmo_pogodynka_parter_humidity
index: 0
font_size: 75
hour24: true
hours_to_show: 24
line_color: var(--cyanish)
line_width: 3
name: Humidity
show:
extrema: true
fill: fade
icon: false
name: false
type: 'custom:mini-graph-card'
- align_icon: left
animate: true
entities:
- entity: sensor.netatmo_pogodynka_parter_co2
index: 0
font_size: 75
hour24: true
hours_to_show: 24
line_color: var(--light-magenta)
line_width: 3
name: CO2
show:
extrema: true
fill: fade
icon: false
name: false
type: 'custom:mini-graph-card'
horizontal: true
type: 'custom:vertical-stack-in-card'
type: 'custom:vertical-stack-in-card'
type: 'custom:vertical-stack-in-card'
column-width: 100%
layout: vertical
max_columns: 3
max_width: 600px
min_columns: 1
min_width: 425px
type: 'custom:layout-card'
At times when I restart HA, I get this message. Do I need to restart HA again to have the weather pick up or it will fix itself?
I notice weatherbit displays this message at times even when HA isn’t restarted, but it fix itself a few minutes (varies) later.
Thanks for the info. I have noticed a few times that the Free API is not answering, and that is why you get this. I have tried to build-in a retry, when connection fails, which you have also noticed.
If it happens after a restart, try and wait for some minutes to see if it does not supply data.
If not, you should be able to go to the Integrations Page, and click on the 3 dots, and press Reload, to reload the integration without having to restart Home Assistant.
yes, that is on each restart since 115 … not sure if it is the same error as before though?
Unexpected error fetching weatherbit data: Error requesting data from https://api.weatherbit.io/v2.0:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/weatherbitpypi/client.py", line 260, in async_request
async with session.request(
File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 1012, in __aenter__
self._resp = await self._coro
File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 504, in _request
await resp.start(conn)
File "/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 847, in start
message, payload = await self._protocol.read() # type: ignore # noqa
File "/usr/local/lib/python3.8/site-packages/aiohttp/streams.py", line 591, in read
await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 143, in async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 131, in _async_update_data
return await self.update_method()
File "/usr/local/lib/python3.8/site-packages/weatherbitpypi/client.py", line 57, in async_get_weather_alerts
return await self._get_weather_alert()
File "/usr/local/lib/python3.8/site-packages/weatherbitpypi/client.py", line 167, in _get_weather_alert
json_data = await self.async_request("get", endpoint)
File "/usr/local/lib/python3.8/site-packages/weatherbitpypi/client.py", line 272, in async_request
raise RequestError(f"Error requesting data from {BASE_URL}: {str(err)}")
weatherbitpypi.errors.RequestError: Error requesting data from https://api.weatherbit.io/v2.0:
and
bit later in the log:
2020-10-02 10:16:28 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up weatherbit platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 201, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 310, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 481, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 522, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state
sstate = self.state
File "/config/custom_components/weatherbit/sensor.py", line 277, in state
return getattr(self._alerts, "alert_count")
File "/config/custom_components/weatherbit/entity.py", line 59, in _alerts
return self.alert_coordinator.data[0]
TypeError: 'NoneType' object is not subscriptable
immediatly after startup has finished we can ‘reload’ the integration. So it seems to be a startup procedure issue in HA, not an availability issue on Weatherbit’s side?
I just tested this on 0.115 and 0.116.dev and I cannot replicate this. The Integration starts fine, without any errors on both systems.
Does this happen every time you restart? What environment is HASS running in?
yes, every time now… 115.1 to 115.6 Home assistant OS
btw, just so you know: Add service integration.reload
Hi,
I found this as a great replacement to the Darksky sensor and went ahead to install it into my system.
I’m running HA 0.114.4 in a docker container on a raspberry pi.
After copying all the files to the weatherbit subfolder I get the below entry in the log file, upon restart:
[homeassistant.loader] Error parsing manifest.json file at /config/custom_components/weatherbit/manifest.json: Expecting value: line 6 column 1 (char 5)
I can’t find “weatherbit” in the integrations.
Any idea what I might do different?
Cheers
Dietger
Hi Dietger,
I can understand from this that you not using HACS (Which I recommend btw).
With the error code you have it seems that there is something wrong with the file format of the manifest.json file. I recommend that you download the whole Github Repository and then extract the files:
If it then loads without problems, you should be able to find the Integration (Maybe you need to do a Hard refresh in your browser) Let me know how that goes.
Hi Bjarne,
many thanks for the quick reply and that indeed solved the issue.
Funny I downloaded file by file, but your suggestion did the trick.
All worked like a charme and the sensors are all there.
Cheers
Dietger
Glad it worked Dietger. I have seens this before if you copy content of file directly from Github - it might miss some line breaks or they are wrong formatted. For the future, if you want to copy a file directly, make sure you open it in Raw format, and then copy.
/B