question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with Platform Average

See original GitHub issue

Hi David - on updating my configurations I’m coming up against an issue with this section of code:

    name: today_temp_bom
    entities:
      - sensor.gosford_temperature
    start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
    end: '{{ now() }}'


      bom_today_max:
        value_template: >
          {%- if states('sensor.kariong_max_0') == 'n/a' -%} 
            {{ state_attr('sensor.today_temp_bom', 'max_value') }}
          {% else %}
            {{ states('sensor.kariong_max_0') }}
          {% endif %}
      bom_today_min:
        value_template: >
          {%- if states('sensor.sensor.kariong_min_0') == 'n/a' -%} 
            {{ state_attr('sensor.today_temp_bom', 'min_value') }}
          {% else %}
            {{ states('sensor.kariong_min_0') }}
          {% endif %}

this throws up a indenting error image

If I move the bom_today_max back 1 tab the error goes away in the file editor but trying “check configuration” fails

image

I think I’ve installed the “average” integration properly - any ideas?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
simonjowettcommented, Oct 30, 2020

No problem David - after all I am using all your hard work for free!

0reactions
DavidFW1960commented, Oct 30, 2020

Really sorry. I just updated the package again. There’s a few ways to do the today_temp_bom - either the average or statistics. (Average is best) With the new BOM integration, the min and max don’t disappear like the old ones did (well the min seems to be deleted in the afternoon) So I changed the way it does the min and max and the old version (which you are using) is in the card right now. A consequence of the change is in my card on my HA, the min and max I pass through to the card are always the ACTUAL not forecast for today using that average sensor.

Anyway, thanks for beta testing my new docs lol!

(I incorrectly jammed the new code in the wrong place)

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Study of More Than 250 Platforms Reveals Why Most Fail
The average life of the failed platforms is only 4.9 years. Many gig economy platforms collapsed within 2-3 years because they did not...
Read more >
Solved: Connector Issue with Average Function
I'm currently experiencing issues with the Average function. I have a SharePoint list called Test. This list has a number column called Value....
Read more >
The Platform Is the Problem
Joan Donovan and Brian Friedberg argue that despite new policies, platforms are grossly unprepared for the 2020 election.
Read more >
The problem with "the platform" - LeadDev
The fundamental misunderstanding most people had was that although these platforms may have addressed 80% of boilerplate application development ...
Read more >
Global social media statistics research summary 2022
The average daily usage is 2 hours and 29 minutes (July 2022). We'll keep this post updated during 2022 as the latest statistics...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found