Comments (6)
If you are a sophisticated user, you can add it through HA.
I use the packages feature, so in my configuration.yaml I have:
...
scene: !include scenes.yaml
# include files from the packages directory
homeassistant:
packages: !include_dir_named packages
In my packages, I have a file called aquarium.yaml, and I put a sumation sensor in there. I think HA has added a helper you can use to do this since I did it, so maybe there's an easier way. Anyway, here's what mine looks like:
template:
sensor:
- name: "Aquarium Power"
unique_id: "aquarium_power_w"
unit_of_measurement: "W"
device_class: "power"
state: >
{% set w1 = (states('sensor.apex_light1_2_1w') | float) %}
{% set w2 = (states('sensor.apex_light2_2_2w') | float) %}
{% set w3 = (states('sensor.apex_retpump_2_3w') | float) %}
{% set w4 = (states('sensor.apex_reflight_2_4w') | float) %}
{% set w5 = (states('sensor.apex_skimmer_2_5w') | float) %}
{% set w6 = (states('sensor.apex_dos_2_6w') | float) %}
{% set w7 = (states('sensor.apex_heater_2_7w') | float) %}
{% set w8 = (states('sensor.apex_pwrhead_2_8w') | float) %}
{{ w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 }}
On the dashboard, under Settings->Devices&Services->Helpers, I clicked "+ Create Helper", and chose "Integration - Riemann sum integral sensor":
I named mine sensor.aquarium_kwh (friendly name: Aquarium kWh). Choose the "Left Riemann sum" option. The trapezoid rule will give an average number between readings which will be wrong if your reporting period is large. I also check the "K" prefix option, but that's up to you.
Then you can add that sensor directly to the energy dashboard as an individual device. From the dashboard home, Settings->Dashboards->Energy, then add an Individual Device:
Once the Energy dashboard starts collecting, it will show under the Monitor Individual Devices section of the Energy tab:
I also created another helper from it, called the Aquarium Utility Meter, which will give you exactly that daily report with a pretty graph I think you want...
from apex-ha.
Indeed, there is now a HA Helper for summing the states of individual sensors, so you can do this without coding at all:
https://www.home-assistant.io/integrations/min_max/
from apex-ha.
Thanks, I'll take a look at doing this.
from apex-ha.
That works nicely. However, there is one issue, and I am not sure what component is responsible. If the wattage does not change for a plug on the apex, i.e. something is always on, the helper entity remains in an unknown state. If all of the outputs are aggregated together this is probably not an issue, but adding them individually it is. Again, I am not sure if this is in your component or the helper component.
from apex-ha.
If you're using the Helper to sum the wattages, I can't help because I haven't done that, but it's not surprising that there's an error like that in an edge case. I think the problem you are running into is a HA situation where they just don't record an input if a new value is the same as the last one. They don't seem to comprehend that an updated steady state is useful information. Can you toggle the switch outlet to force it to pick up data?
from apex-ha.
I suspect you are correct this is a HA issue. That is exactly what I had to do, toggle the outputs off/on then they showed up. Thanks for all the work you have put in to this.
from apex-ha.
Related Issues (20)
- Allow apex local network name instead of ip HOT 8
- Base variables are reported as a switch HOT 20
- Temperature is unitless in rest interface HOT 3
- IOTA pump is not exposed HOT 18
- Entity naming is terse HOT 2
- remove __pycache__ directory HOT 1
- Rebooting Apex loses HA connection permanently HOT 3
- Consider: support some template controls from Apex HOT 1
- Another measurement type HOT 6
- Strange log error HOT 4
- More of a request... HOT 3
- pH is not technically a unit HOT 2
- Discussion: should Apex switches just be OFF/AUTO? HOT 8
- Discussion: Controlling DOS Pumps HOT 7
- Integration seems to cause the Neptune to lock the local interface HOT 3
- License? HOT 1
- Combining Sensors HOT 3
- Measurements HOT 2
- Missing Temperature Probe Entity HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apex-ha.