Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95478

Record TV ON hours and display as barchartH

$
0
0

@PorreKaj wrote:

Goal: record number of hours the Tv is ON, and display a per day chart of the previous week.

TV ON/OFF is available through media_player.living_room_tv (LG). the data is more or less already there, but i’m stumped on how to get it translated to a per day chart.

I have set up a history sensor (today) but I’m not confident in that it will give me what I want.

- platform: history_stats
    name: TV_ON_Today
    entity_id: media_player.living_room_tv
    state: 'on'
    type: time
    start: '{{ now().replace(hour=0, minute=0, second=0) }}'
    end: '{{ now().replace(hour=23, minute=59, second=59) }}'

I’ve also setup a Utility_meter based on the history sensor, but I’m perplexed wether it will give me what I want.

utility_meter:
  tvondaily:
    source: sensor.TV_ON_Today
    cycle: daily

Any pointers?

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95478

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>