Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


peejayw

1913 posts

Uber Geek
+1 received by user: 123


#306118 29-Jun-2023 18:14
Send private message

Is anyone experienced with History Stats? I have set up a rain gauge following this project and its working well. Currently the daily rainfall data resets to zero at midnight and I want it to run from 7am to 7am the following day instead so I changed the sensor as follows,

 

```
- platform: history_stats
    name: Rainsensor flips
    entity_id:  binary_sensor.lumi_lumi_sensor_magnet_aq2_opening_2
    state: "off"
    type: count
    start: '{{ now().replace(hour=7, minute=0, second=0) }}'
    duration:
      hours: 24
```

 

but that didnt work, still rolled over at 12.00

 

I asked the OP for advice and he said to make these changes...

 

remove "start"

 

and add

 

end: "{{ (now().replace(minute=0, second=0, microsecond=0) + timedelta(hours=8)).replace(hour=16) }}"
duration:
    hours: 24

 

That didnt work either so now I am hoping someone here could advise me.

 

Thanks.

 

 

 

 





 I'm supposed to respect my elders, but it's getting harder and harder for me to find one now.


Create new topic
Tinkerisk
4798 posts

Uber Geek
+1 received by user: 3660


  #3096317 29-Jun-2023 18:35
Send private message

Data collection sent to InfluxDB („big data“) and data display/analysis with Grafana.

 

 





- NET: FTTH & VDSL, OPNsense, 10G backbone, GWN APs
- SRV: 12 RU HA server cluster, 0.1 PB storage on premise
- IoT:   thread, zigbee, tasmota, BidCoS, LoRa, WX suite, IR
- 3D:    two 3D printers, 3D scanner, CNC router, laser cutter




hairy1
3352 posts

Uber Geek
+1 received by user: 644

ID Verified
Trusted
Lifetime subscriber

  #3097422 29-Jun-2023 21:19
Send private message

I haven't used it but take a look at the Victoria Metrics add on.

Cheers, Matt




My views (except when I am looking out their windows) are not those of my employer.


Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.