josephny
(Joseph)
December 6, 2024, 11:46am
1
This is a better (I hope) formed question than my previous post.
I have a sensor: sensor.propane_tank_neevo_371_gallons
This sensor gets updated daily with the number of gallons of propane remaining in my tank.
For example, the daily readings might be:
1st of the month: 500 gallons
2nd of the month: 490
3rd of the month: 475
…
30th of the month: 200
31st of the mont: 180
What I would like is a card with a graph/chart/lines that show 4 things:
Daily number of gallons used (i.e, yesterday’s total minus today’s total): X-axis=day-of-month; Y-axis=gallons
Daily cost (i.e., daily number from #1 above * $3.50: X-axis=day-of-month; Y-axis=dollars
Running monthly total for gallons used: X-axis=day-of-month; Y-axis=gallons (but posibly different scale from #1 )
Running monthly total for cost of gas: X-axis=day-of-month; Y-axis=dollars (but different scale from #2 )
The sensor is created in configuration.yaml as follows:
command_line:
- sensor:
command: "curl -k -u <USER>:<PASSWORD> https://ws.otodatanetwork.com/neevoapp/v1/DataService.svc/GetAllDisplayPropaneDevices --header Content-Type:application/json"
name: "Propane Tank Neevo 371 Gallons"
unique_id: propane_tank_371_gallons
value_template: "{{ value_json[0].Level|float(0) * 2.4 if value_json[0].Level is defined else this.state }}"
scan_interval: 14400
state_class: measurement
unit_of_measurement: "Gallons"
Can someone please guide me on this (from scratch, like which card to use, what new variables/sensors/helpers/etc should be created, etc.)?
Of course, if there is a better way to visualize or present this data, I’d love to hear about it.
The goal is to be able to see ‘at a glance’ my heating fuel usage and cost by day and month
Thank you!
So the first thing to do is get 3 template sensors setup and define a time sequence of actions.
Yesterdays Level - Trigger Template @ 11:30 PM {{ states(‘sensor,propane_current_level’) }} - this is going to copy that value of the propane take into a new sensor called yesterday.
Command line sensor - Trigger@ 11:40 PM - this updates the values of current.
Todays Usage - Trigger Template @ 11:50 PM - calculate difference between current and yesterday. This is how much was used today.
One that is working, then we can look at the next step of setting up weekly and monthly utility meters.
josephny
(Joseph)
December 6, 2024, 2:07pm
3
Is there UI way to create a Trigger Template?
Do I understand correctly:
Copy day 0’s propane value into a sensor named ‘yesterday’
Create a new sensor day 1’s value – ‘today’
Create a new sensor that calculates the difference
I’m sure I don’t know how to do that any of that correctly.
There should be a way to do it in the UI. I don’t use the UI, I write it in YAML.
Start with looking at the documentation. Template - Home Assistant
You are going to want to use a time trigger to control when the updates happen.
check this
if you need something more advance with Energy Management :
I just ordered a Mopeka PRO+ LR (M1015) and Bluetooth adapter to try it out. I was thinking that I would require the Mopeka Bridge for it to work. I love that this is 100% local.
Do you have it working with the energy dashboard?
josephny
(Joseph)
December 6, 2024, 4:34pm
6
Thank you guys. I wish I could focus on this, but it takes more time than I have to learn and get it right (even though I do enjoy learning it and doing it myself).
josephny
(Joseph)
December 9, 2024, 11:24am
7
I’ve been trying with trigger template sensors and I’m more confused than ever.
Can someone please help with the yaml that creates a sensor at 11:45pm every day from the value of sensor.propane_tank_neevo_371_gallons
I already have the yaml to get the daily value of sensor.propane_tank_neevo_371_gallons every 14400 seconds (twice per day, in even thought it should not change, just case it fails the first time). But, instead of a scan interval, I assume the time should be hard coded, perhaps 2am and 2pm (should get the same value both times).
Thank you.
josephny
(Joseph)
December 10, 2024, 11:01am
8
Okay, I just can’t.
template:
- trigger:
- platform: time
at:
- "23:00"
- sensor:
name: "Propane Tank Neevo 371 Gallons Yesterday"
value_template: "sensor.propane_tank_neevo_371_gallons"
state_class: measurement
unit_of_measurement: "Gallons"
josephny
(Joseph)
December 10, 2024, 1:34pm
9
josephny:
I have a sensor: sensor.propane_tank_neevo_371_gallons
This sensor gets updated daily with the number of gallons of propane remaining in my tank.
For example, the daily readings might be:
1st of the month: 500 gallons
2nd of the month: 490
3rd of the month: 475
…
30th of the month: 200
31st of the mont: 180
What I would like is a card with a graph/chart/lines that show 4 things:
Daily number of gallons used (i.e, yesterday’s total minus today’s total): X-axis=day-of-month; Y-axis=gallons
Daily cost (i.e., daily number from #1 above * $3.50: X-axis=day-of-month; Y-axis=dollars
Running monthly total for gallons used: X-axis=day-of-month; Y-axis=gallons (but posibly different scale from #1 )
Running monthly total for cost of gas: X-axis=day-of-month; Y-axis=dollars (but different scale from #2 )
The sensor is created in configuration.yaml as follows:
command_line:
- sensor:
command: "curl -k -u <USER>:<PASSWORD> https://ws.otodatanetwork.com/neevoapp/v1/DataService.svc/GetAllDisplayPropaneDevices --header Content-Type:application/json"
name: "Propane Tank Neevo 371 Gallons"
unique_id: propane_tank_371_gallons
value_template: "{{ value_json[0].Level|float(0) * 2.4 if value_json[0].Level is defined else this.state }}"
scan_interval: 14400
state_class: measurement
unit_of_measurement: "Gallons"
Can someone please guide me on this (from scratch, like which card to use, what new variables/sensors/helpers/etc should be created, etc.)?
Of course, if there is a better way to visualize or present this data, I’d love to hear about it.
The goal is to be able to see ‘at a glance’ my heating fuel usage and cost by day and month
Thank you!
Can I pay someone here to do this for me?