Giter Club home page Giter Club logo

openepaperlink-ha-weatherman's People

Contributors

chunkysteveo avatar janjoh avatar muddyrock avatar svenove avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

openepaperlink-ha-weatherman's Issues

Can't find hourly forecast

The instructions says to enable hourly forecast, but I can't figure out how...
I'm new to HASS, so it might be just me...

I've looked at the entities to the Met.no integration, and set to show disabled entities too, but it's still not there...

Weatherman stopped working

Strangely after an update to the latest HA, the weatherman data tag isn't updating - getting an unknown state.

I installed the template again, but that didn't seem to make a difference. Is this just me?

UnicodeDecodeError

Hi. For some reason, I didn't have a weather.home but a (let's call it) weather.mylocation. Updated the template and automation accordingly.

The template updates alright (attribute data below), but the automation fails with the following:

2023-11-13 22:20:20.290 ERROR (MainThread) [homeassistant.components.automation.epaper_weatherman] While executing automation automation.epaper_weatherman
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 655, in async_trigger
    await self.action_script.async_run(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1578, in async_run
    return await asyncio.shield(run.async_run())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 420, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 470, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 493, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2035, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2072, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/open_epaper_link/__init__.py", line 44, in drawcustomservice
    imgbuff = await hass.async_add_executor_job(customimage,entity_id, service, hass)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/open_epaper_link/imagegen.py", line 181, in customimage
    data = json.load(f)
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/__init__.py", line 293, in load
    return loads(fp.read(),
                 ^^^^^^^^^
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf0 in position 2286967: invalid continuation byte

This is the attribute data for the weatherman template sensor:

moon_phase: moon-new
wm_cond_now: cloudy
wm_cond_0: night-partly-cloudy
wm_temp_0: -1
wm_time_0: 10 PM
wm_cond_1: cloudy
wm_temp_1: -1
wm_time_1: 11 PM
wm_cond_2: cloudy
wm_temp_2: -1
wm_time_2: 12 AM
wm_cond_3: cloudy
wm_temp_3: -1
wm_time_3: 1 AM
wm_cond_4: cloudy
wm_temp_4: -1
wm_temp_4_low: -2
wm_time_4: Mon
wm_cond_5: cloudy
wm_temp_5: 1
wm_temp_5_low: -1
wm_time_5: Tue
wm_cond_6: cloudy
wm_temp_6: 0
wm_temp_6_low: -2
wm_time_6: Wed
wm_cond_7: cloudy
wm_temp_7: -2
wm_temp_7_low: -4
wm_time_7: Thu
friendly_name: Weatherman Data Tag

Apart from the temperature unit, I can't really see what else in the automation could throw a fit about. Have looked into pretty much all of the template-code in the automation, and all seems to check out.

{{ state_attr('weather.mylocation','temperature_unit') }}
Resultattyp: string
°C

Font is in place. Latest openepaper HA integration and HA 2023.11.2.

Any ideas?

EDIT: Speling.

weatherman_data_tag not populating

I'm having a weird issue here - in that the data_tag is partially populating.

moon_phase: moon-waxing-gibbous
sun_next_rising: 5:06 AM
sun_next_setting: 8:53 PM
temperature_unit: null
wind_speed_unit: null
precipitation_unit: null
pressure_unit: null
wm_cond_now: null
wm_temp_now: null
wm_wind_speed_now: null
wm_wind_dir_now: null
wm_dew_point_now: null
wm_humidity_now: null
wm_cloud_coverage_now: null
wm_pressure_now: null
wm_cond_0: null
..
..

I've checked that the forecast entity is indeed weather.home

{%- for state in states | selectattr('domain','equalto','weather') %}
{{ state.entity_id }}
{%- endfor -%}

returns: weather.home

  • and the units are showing in the developer tools :
    temperature: 16.9
    dew_point: 14.1
    temperature_unit: °C
    humidity: 83
    cloud_coverage: 10.2
    pressure: 1012.9
    pressure_unit: hPa
    wind_bearing: 41.4
    wind_speed: 5.4
    wind_speed_unit: km/h
    visibility_unit: km
    precipitation_unit: mm
    attribution: >-
    Weather forecast from met.no, delivered by the Norwegian Meteorological
    Institute.
    friendly_name: Forecast Home
    supported_features: 3

I've tried this on a different instance of HA and it works fine.
in developer tools, in the Template section,

"{{ state_attr('weather.home','pressure_unit') }}"

returns "hPa" as it should.

No longer compatible?

The installation instructions are a bit vague:

Add template sensor ha-configuration.yaml to your configuration file in Home Assistant.

The ha-configuration.yaml is not a valid template sensor, so I am not quite sure how to install this?

Low/high forecast today only show from now till midnight

The low/high doesn’t show the lowest/highest temperature forecasted today, but show from “now” till midnight. So looking a the forecast at 8pm shows only lowest/highest for the next 4 hours. And since the tag already show the next hours individually it would be better to show todays forecasted low/high for the entire day.

This would mean updating the low/high forecast for today either only at midnight or that each update it check to see if the forecast is a new low or new high.

Any suggestion on how to implement that the easiest way?

fter today's Homeassistant update, the ha-configuration.yaml no longer works if you have set it to 24h.

After today's Homeassistant update, the ha-configuration.yaml no longer works if you have set it to 24h.

As soon as I change the data to:
wm_time_0: >
{{ as_timestamp(weather_home_hourly.forecast[0].datetime) | timestamp_custom('%H') }}

the
sensor.weatherman_data_tag

becomes unavailable.

in weather.home
the weather data is available.
No matter which config I use.

This definitely worked before the update.
If I use the configuration.yaml (with 12pm etc.) "original" I get the weatherdata.

Cannot get this working

Hi,

New to ePaper but bought a YelloAP and connected a Sollum 2.9” to it fine and it is also exposed to HA with entity open_epaper_link.0000021eeb8a0000.

I have installed the integrations:
Met.no
Moon
Sun

I added the code from ha-configuration.yaml to my teamplates.yaml without modifying anything in the code.
I added the code from automation-2.9.yaml to my automations.yaml and only changed the target to the right open_epaper_link.0000021eeb8a0000.

Also copied the GothamRnd-Bold.ttf to the config/media folder.

I do not get updates to the 2.9” display.

Have I missed something and how to troubleshoot?

Thanks,
Ase

Help with time format 12h -> 24h

Thanks for a great Integration,
I see in the "<> Code" part info for 24 time format.

Sadly I do not understand where in the code I should put this?
Any Example?

Thanks,
Ase

Display does not update regularly

Hello,
I have the problem that my EPaper Dispaly with the weather data does not update regularly.

I have switched it 24 hours a day and always have the feeling that it only updates for the first time around 10 in the morning and the last time around 8 in the evening. Between 10am and 8pm the updates work 90% of the time.

I have several epaper displays running (with other HA data), all with the same settings for when to update. This works on all other displays without any problems, except for the weather.

Do you have any idea what the problem could be?

https://dpaste.org/VA807 -automation
https://dpaste.org/SzPvq -template

Weather entity 'weather.home' does not support 'hourly' forecast when adding Weatherman

HomeAssistant:
2024.4.1

Setup:
Added the content of the config file to the configuration.yaml and get the following issue:

Error:
Trigger Update Coordinator: Error executing script. Error for call_service at pos 1: Weather entity 'weather.home' does not support 'hourly' forecast

Crosscheck:
I can run it smoothly from the developer tools:
Request:
service: weather.get_forecasts target: entity_id: weather.forecast_home data: type: hourly response_variable: weather_home_hourly

Answer from developer tools:
`weather.forecast_home:
forecast:
- condition: partlycloudy
datetime: "2024-04-07T13:00:00+00:00"
wind_bearing: 109.8
cloud_coverage: 98.4
temperature: 23.3
wind_speed: 11.5
precipitation: 0
humidity: 44
- condition: partlycloudy
datetime: "2024-04-07T14:00:00+00:00"
wind_bearing: 104.6
cloud_coverage: 90.6
temperature: 23.4
wind_speed: 12.2
precipitation: 0
humidity: 44
- condition: partlycloudy
datetime: "2024-04-07T15:00:00+00:00"
wind_bearing: 102
cloud_coverage: 98.4
temperature: 23.4
wind_speed: 13.3
precipitation: 0
humidity: 44

more removed`

[suggestion] Change current condition temp to round instead of int

Hi,

Yet another very minor suggestion. In the automation, the current condition -temperature isn't rounded but concatenated into an integer. I.e., a temperature of -3.6 would show as "-3".

- type: text
          value: |-
            {{ state_attr('weather.home','temperature') | int(0) }}{{
             state_attr('weather.home','temperature_unit') }}

Suggestion, change from int(0) to round. Thus, a temperature of -3.6 would show as "-4"

Error when changing to 24h

Ok so I followed closely your guide on how to change to 24h.
But after changing the part in the automation I get this error when trying to run the automation:
Error: Error rendering data template: TypeError: %d format: a real number is required, not str
Any ideas whats wrong? :)

Test 4.2 Variables

hey @svenove - i've updated the automation to use variables, so the "severe weather" types and low temp can be stored in an array, and each "cond" checked against this to make it red/black.

It's working on my 2.9" tag perfect.

I have updated your 4.2" automation with the new variables, and also added wind_speed and precipitation (10 and 10) checks too.

Can you test this new automation yaml and check it works for you, for me?

Thanks - Steve

Can't get it working

Did not succeed much in getting this going. I'm taking a step back to just start from scratch and looking at things - have fixed a few on the way, but here's what I think the next hurdle is.

I am calling this service manually in HA using Developer tools

service: weather.get_forecasts
target:
  entity_id: weather.home
data:
  type: hourly
response_variable: weather_home_hourly

This is the answer : Failed to call service weather.get_forecasts. Weather entity 'weather.home' does not support 'hourly' forecast

I am seeing this in my startup logs, but I don't think this matters much until the above could be resolved?
image

Note that type: daily works fine.

TypeError: '>' not supported between instances of 'NoneType' and 'int'

Stopped working after HA 2024.4 update.

Error: Error rendering data template: TypeError: '>' not supported between instances of 'NoneType' and 'int'
service: open_epaper_link.drawcustom
data:
  dry-run: false
  background: white
  rotate: 0
  payload:
    - type: icon
      value: '{{ state_attr(''sensor.weatherman_data_tag'',''moon_phase'') | string }}'
      x: 85
      'y': 1
      size: 18
      color: black
    - type: text
      value: >-
        {{ state_attr('sensor.weatherman_data_tag','wm_temp_0') | string }}{{
        state_attr('sensor.weatherman_data_tag','temperature_unit') }}
      font: ../../media/GothamRnd-Bold.ttf
      x: 125
      'y': 47
      size: 18
      color: >-
        {{'black' if state_attr('sensor.weatherman_data_tag','wm_temp_0') >
        severe_temp_low else 'red' }}
      anchor: mt
    - type: icon
      value: >-
        weather-{{ state_attr('sensor.weatherman_data_tag','wm_cond_0') | string
        }}
      x: 108
      'y': 13
      size: 34
      color: >-
        {{'red' if state_attr('sensor.weatherman_data_tag','wm_cond_0') in
        severe_weather else 'black' }}
    - type: text
      value: >-
        {{ state_attr('sensor.weatherman_data_tag','wm_temp_1') | string }}{{
        state_attr('sensor.weatherman_data_tag','temperature_unit') }}
      font: ../../media/GothamRnd-Bold.ttf
      x: 174
      'y': 47
      size: 18
      color: >-
        {{'black' if state_attr('sensor.weatherman_data_tag','wm_temp_1') >
        severe_temp_low else 'red' }}
      anchor: mt
    - type: icon
      value: >-
        weather-{{ state_attr('sensor.weatherman_data_tag','wm_cond_1') | string
        }}
      x: 157
      'y': 13
      size: 34
      color: >-
        {{'red' if state_attr('sensor.weatherman_data_tag','wm_cond_1') in
        severe_weather else 'black' }}
    - type: text
      value: >-
        {{ state_attr('sensor.weatherman_data_tag','wm_temp_2') | string }}{{
        state_attr('sensor.weatherman_data_tag','temperature_unit') }}
      font: ../../media/GothamRnd-Bold.ttf
      x: 223
      'y': 47
      size: 18
      color: >-
        {{'black' if state_attr('sensor.weatherman_data_tag','wm_temp_2') >
        severe_temp_low else 'red' }}
      anchor: mt
    - type: icon
      value: >-
        weather-{{ state_attr('sensor.weatherman_data_tag','wm_cond_2') | string
        }}
      x: 206
      'y': 13
      size: 34
      color: >-
        {{'red' if state_attr('sensor.weatherman_data_tag','wm_cond_2') in
        severe_weather else 'black' }}
    - type: text
      value: >-
        {{ state_attr('sensor.weatherman_data_tag','wm_temp_3') | string }}{{
        state_attr('sensor.weatherman_data_tag','temperature_unit') }}
      font: ../../media/GothamRnd-Bold.ttf
      x: 272
      'y': 47
      size: 18
      color: >-
        {{'black' if state_attr('sensor.weatherman_data_tag','wm_temp_3') >
        severe_temp_low else 'red' }}
      anchor: mt
    - type: icon
      value: >-
        weather-{{ state_attr('sensor.weatherman_data_tag','wm_cond_3') | string
        }}
      x: 255
      'y': 13
      size: 34
      color: >-
        {{'red' if state_attr('sensor.weatherman_data_tag','wm_cond_3') in
        severe_weather else 'black' }}
    - type: text
      value: '{{ state_attr(''sensor.weatherman_data_tag'',''wm_temp_4'') | string }}'
      font: ../../media/GothamRnd-Bold.ttf
      x: 122
      'y': 111
      size: 14
      color: >-
        {{'black' if state_attr('sensor.weatherman_data_tag','wm_temp_4') >
        severe_temp_low else 'red' }}
      anchor: rt
    - type: text
      value: /
      font: ../../media/GothamRnd-Bold.ttf
      x: 125
      'y': 112
      size: 14
      color: black
      anchor: mt
    - type: text
      value: '{{ state_attr(''sensor.weatherman_data_tag'',''wm_temp_4_low'') | string }}'
      font: ../../media/GothamRnd-Bold.ttf
      x: 128
      'y': 118
      size: 14
      color: >-
        {{'black' if state_attr('sensor.weatherman_data_tag','wm_temp_4_low') >
        severe_temp_low else 'red' }}
      anchor: lt
    - type: icon
      value: >-
        weather-{{ state_attr('sensor.weatherman_data_tag','wm_cond_4') | string
        }}
      x: 108
      'y': 78
      size: 34
      color: >-
        {{'red' if state_attr('sensor.weatherman_data_tag','wm_cond_4') in
        severe_weather else 'black' }}
    - type: text
      value: '{{ state_attr(''sensor.weatherman_data_tag'',''wm_temp_5'') | string }}'
      font: ../../media/GothamRnd-Bold.ttf
      x: 171
      'y': 111
      size: 14
      color: >-
        {{'black' if state_attr('sensor.weatherman_data_tag','wm_temp_5') >
        severe_temp_low else 'red' }}
      anchor: rt
    - type: text
      value: /
      font: ../../media/GothamRnd-Bold.ttf
      x: 174
      'y': 112
      size: 14
      color: black
      anchor: mt
    - type: text
      value: '{{ state_attr(''sensor.weatherman_data_tag'',''wm_temp_5_low'') | string }}'
      font: ../../media/GothamRnd-Bold.ttf
      x: 177
      'y': 118
      size: 14
      color: >-
        {{'black' if state_attr('sensor.weatherman_data_tag','wm_temp_5_low') >
        severe_temp_low else 'red' }}
      anchor: lt
    - type: icon
      value: >-
        weather-{{ state_attr('sensor.weatherman_data_tag','wm_cond_5') | string
        }}
      x: 157
      'y': 78
      size: 34
      color: >-
        {{'red' if state_attr('sensor.weatherman_data_tag','wm_cond_5') in
        severe_weather else 'black' }}
    - type: text
      value: '{{ state_attr(''sensor.weatherman_data_tag'',''wm_temp_6'') | string }}'
      font: ../../media/GothamRnd-Bold.ttf
      x: 220
      'y': 111
      size: 14
      color: >-
        {{'black' if state_attr('sensor.weatherman_data_tag','wm_temp_6') >
        severe_temp_low else 'red' }}
      anchor: rt
    - type: text
      value: /
      font: ../../media/GothamRnd-Bold.ttf
      x: 223
      'y': 112
      size: 14
      color: black
      anchor: mt
    - type: text
      value: '{{ state_attr(''sensor.weatherman_data_tag'',''wm_temp_6_low'') | string }}'
      font: ../../media/GothamRnd-Bold.ttf
      x: 226
      'y': 118
      size: 14
      color: >-
        {{'black' if state_attr('sensor.weatherman_data_tag','wm_temp_6_low') >
        severe_temp_low else 'red' }}
      anchor: lt
    - type: icon
      value: >-
        weather-{{ state_attr('sensor.weatherman_data_tag','wm_cond_6') | string
        }}
      x: 206
      'y': 78
      size: 34
      color: >-
        {{'red' if state_attr('sensor.weatherman_data_tag','wm_cond_6') in
        severe_weather else 'black' }}
    - type: text
      value: '{{ state_attr(''sensor.weatherman_data_tag'',''wm_temp_7'') | string }}'
      font: ../../media/GothamRnd-Bold.ttf
      x: 269
      'y': 111
      size: 14
      color: >-
        {{'black' if state_attr('sensor.weatherman_data_tag','wm_temp_7') >
        severe_temp_low else 'red' }}
      anchor: rt
    - type: text
      value: /
      font: ../../media/GothamRnd-Bold.ttf
      x: 272
      'y': 112
      size: 14
      color: black
      anchor: mt
    - type: text
      value: '{{ state_attr(''sensor.weatherman_data_tag'',''wm_temp_7_low'') | string }}'
      font: ../../media/GothamRnd-Bold.ttf
      x: 275
      'y': 118
      size: 14
      color: >-
        {{'black' if state_attr('sensor.weatherman_data_tag','wm_temp_7_low') >
        severe_temp_low else 'red' }}
      anchor: lt
    - type: icon
      value: >-
        weather-{{ state_attr('sensor.weatherman_data_tag','wm_cond_7') | string
        }}
      x: 255
      'y': 78
      size: 34
      color: >-
        {{'red' if state_attr('sensor.weatherman_data_tag','wm_cond_7') in
        severe_weather else 'black' }}
    - type: text
      value: >-
        {{ '%0.2d' | format(state_attr('sensor.weatherman_data_tag','wm_time_0')
        | int) | string | upper }}
      font: ../../media/GothamRnd-Bold.ttf
      x: 125
      'y': 2
      size: 12
      color: black
      anchor: mt
    - type: text
      value: >-
        {{ '%0.2d' | format(state_attr('sensor.weatherman_data_tag','wm_time_1')
        | int) | string | upper }}
      font: ../../media/GothamRnd-Bold.ttf
      x: 174
      'y': 2
      size: 12
      color: black
      anchor: mt
    - type: text
      value: >-
        {{ '%0.2d' | format(state_attr('sensor.weatherman_data_tag','wm_time_2')
        | int) | string | upper }}
      font: ../../media/GothamRnd-Bold.ttf
      x: 223
      'y': 2
      size: 12
      color: black
      anchor: mt
    - type: text
      value: >-
        {{ '%0.2d' | format(state_attr('sensor.weatherman_data_tag','wm_time_3')
        | int) | string | upper }}
      font: ../../media/GothamRnd-Bold.ttf
      x: 272
      'y': 2
      size: 12
      color: black
      anchor: mt
    - type: text
      value: >-
        {{ state_attr('sensor.weatherman_data_tag','wm_time_4') | string | upper
        }}
      font: ../../media/GothamRnd-Bold.ttf
      x: 125
      'y': 67
      size: 12
      color: black
      anchor: mt
    - type: text
      value: >-
        {{ state_attr('sensor.weatherman_data_tag','wm_time_5') | string | upper
        }}
      font: ../../media/GothamRnd-Bold.ttf
      x: 174
      'y': 67
      size: 12
      color: black
      anchor: mt
    - type: text
      value: >-
        {{ state_attr('sensor.weatherman_data_tag','wm_time_6') | string | upper
        }}
      font: ../../media/GothamRnd-Bold.ttf
      x: 223
      'y': 67
      size: 12
      color: black
      anchor: mt
    - type: text
      value: >-
        {{ state_attr('sensor.weatherman_data_tag','wm_time_7') | string | upper
        }}
      font: ../../media/GothamRnd-Bold.ttf
      x: 272
      'y': 67
      size: 12
      color: black
      anchor: mt
    - type: line
      fill: black
      width: 1
      x_start: 125
      y_start: 64
      x_end: 272
      y_end: 64
    - type: text
      value: >-
        {{ states('sensor.average_outside_temperature') | round | int(0) }}{{
        state_attr('sensor.weatherman_data_tag','temperature_unit') }}
      font: ../../media/GothamRnd-Bold.ttf
      x: 52
      'y': 94
      size: 38
      anchor: mt
      color: >-
        {{'black' if states('sensor.average_outside_temperature') | round >
        severe_temp_low else 'red' }}
    - type: icon
      value: >-
        weather-{{ state_attr('sensor.weatherman_data_tag','wm_cond_now') |
        string }}
      x: 6
      'y': 2
      size: 92
      color: >-
        {{'red' if state_attr('sensor.weatherman_data_tag','wm_cond_now') in
        severe_weather else 'black' }}
target:
  entity_id:
    - open_epaper_link.0000021EE4583B13

Also noticed this error in the logs:

Template variable error: 'None' has no attribute 'split' when rendering '{% set cond_moon = state_attr('sensor.moon_phase', 'icon') %} {{ cond_moon.split('mdi:')[1] }}'

Show days in own language

As I understand, the timestamp_custom('%a') only returns the english version of the weekday and that is a limitation in HASS OS.
It seems there is a "mapping function" that can be used to manually enter the local abbrivations of the weekdays in a list, that will replace the "%a" returned english weekdays.

But, it's a bit too complicated for me to figure out how to implement it in the template...
See the solution here:
https://community.home-assistant.io/t/day-and-month-does-not-follow-locale-setting/406491/4

[suggestion] Sensor: last trigger as status instead of "OK"

Hi,

Thanks for the templates! Works well.

I've made two changes. One, I think is genuinely useful; the other is more aesthetic, and might or might not be your liking.

  1. In the template, I've changed so that instead of status "OK", status of the sensor is timestamp of last triggered.
  - name: Weatherman Data Tag
    state: "{{ now().isoformat() }}"

Status could then for example be: 2023-11-14T20:15:00.249120+01:00.

  1. I changed the color of temperature to a template evaluating to red if subzero. For example,
color: >-
  {%if state_attr('sensor.weatherman_data_tag', 'wm_temp_7') | int < 0 %}red
  {%else %}black
  {%endif%}

It might then looks as below.
open_epaper_link 0000026c3a143b1d

In the example code above, it only considered the average temperature of the day, not lowest. Might add the condition that if either avg or low temp is subzero, colour would be red; haven't decided yet.

Anyway, just mentioning the above in case someone else would find it useful.

Cannot open resource

My automation reports that it cannot find the resource.
image

If I paste something else into the data on the automation it works perfectly fine ie:
background: white
rotate: 270
ttl: 300
payload:
- type: rectangle
outline: red
fill: white
width: 5
x_start: 10
y_start: 10
x_end: 185
y_end: 240
- type: line
fill: red
width: 3
x_start: 0
y_start: 237
x_end: 196
y_end: 240
- type: text
value: "Hello World!"
font: "ppb.ttf"
x: 0
"y": 0
size: 40
color: red
- type: icon
value: account-cowboy-hat
x: 60
y: 120
size: 120
color: red

Any clue on where to start?

Non valid icon used

Hi,

I added the configuration part to configuration.yaml and added the automation as instructed. met.no and sun integration were already present, i only added the moon one.

I added my epaper ID in the automation like this.

target:
entity_id:
- open_epaper_link.0000021E72E67430

I hope this is correct.

When i try to fire the automation by hand it throws the above error - as there are multiple icons used in the automation I am at a loss were to start.

My wife and I would be immensely grateful for any help.

Thanks in advance - Stefan

Error

I cant execute this. I get error:
Error: Error rendering data template: TypeError: '>' not supported between instances of 'NoneType' and 'int'

Oh, and the Variables wont copy over when I copy the code. I think they need to be added separate in the automation, right?

Error rendering Nonetype and int

Error rendering data template: TypeError: '>' not supported between instances of 'NoneType' and 'int'

Both my 4.2 and 2.9 tags affected.

Investigating....

Use 24h or 12h time

Not sure if this is a setting that can be retrieved from HASS or not, but it would be nice of the template selected 24h or 12h time based on the HASS-locale (or something?).

I manually changed all these:
{{ as_timestamp(weather_home_hourly.forecast[1].datetime) | timestamp_custom('%I') | int }} {{ as_timestamp(weather_home_hourly.forecast[1].datetime) | timestamp_custom('%p') }}
to
{{ as_timestamp(weather_home_hourly.forecast[1].datetime) | timestamp_custom('%H') | int }}

...and that did what I want, but if it was possible to have it happen automatically, that would be even better for us newbies. :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.