2021.9.0: More energy, USB discovery, template ❤️

No, you are consuming a volume of gas.
Depending on how efficient the device is that you use to convert the gas to power/energy plays a big factor.
If you know the relation between m3 of gas and kWh produced/consumed in your specific case you could always create that sensor yourself.

And the quality of the gas will make a difference. Not all gas is the same.

Anyone found that the new light icon base on color temperature will make the light disappear into the white background if set to daylight white? Any settings to get it back to standard yellow/blue?

Thank you very much for the good explantation. I will check this out. But it looks, like I can just delete the wrong values with that, instead with starting from scratch.

Is it possible to add state_class: total_increasing to the REST sensor?

I’m trying to add data from my smart meter to the energy dashboard (which is captured by CEMM made by cedel and has a local open API). I use the REST sensor for this. I’m able to add the numbers to the dashboard, but adding ‘state-class’ to the sensor results in errors.

My current code for the T1 sensor:

- platform: rest
  resource: http://192.168.XXX.XX/open-api/v1/p1/realtime/
  method: GET
  name: 'Stroomverbruik laag tarief - T1'
  value_template: '{{ value_json["data"].t1[1] | round(2) | float }}'
  device_class: energy
  unit_of_measurement: kWh
  scan_interval: 600

Maybe I can change the value using a template of some sorts but that part I don’t really understand (yet). Adding support for the state-class variable to the rest sensor seems to me like a great addition. But maybe I’m simplifying things… not an IT-background :slight_smile:
Any other tips are welcome ofcourse.

Support this idea here:

image

Both options were originally proposed in the mockups, choice is always better. :slight_smile:

It has to be optional to use either kWh or cubic metres i think.

Personally I buy my LPG in 9kg bottles, and people who have more accessible houses get it delivered in 110kg bottles. So there we have another alternative. :slight_smile:

If you first run a select for example for one specific reading then you see what will be deleted. If you see the data which need to be delete just change “SELECT *” with “DELETE”

one row:

SELECT *
FROM "statistics"  where metadata_id='25'
and start like '2021-09-05 11:00%'

Or for all readings for a date …start like ‘2021-09-05 %’

And if you want to use a nested query:

SELECT *
FROM "statistics" where metadata_id in (select id from statistics_meta where statistic_id ='sensor.steca_energy')
and start like '2021-08-06 16:00%'

I see this, not quite the error you have. HA Supervised with Bullseye.

[03:05:53] INFO: Please be patient, this might take a few minutes...
[03:07:23] INFO: Installed Home Assistant 2021.9.4
[03:07:23] INFO: Making a copy of your configuration for checking...
[03:07:28] INFO: Checking your configuration against this version...
[03:12:21] INFO: Configuration check finished - no error found! :)
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

And in the supervisor log…

21-09-07 03:05:51 WARNING (SyncWorker_4) [supervisor.docker.interface] Can't grep logs from homeassistant/amd64-addon-check_config: 409 Client Error for http+docker://localhost/v1.41/containers/1aa7edf215dfe7e56e03268da49f47fe97d677ea069544fd53107489dc215443/logs?stderr=1&stdout=1&timestamps=0&follow=0&tail=100: Conflict ("can not get logs from container which is dead or marked for removal")

Yes, I consume a volume.
At least in Germany you pay for kWh. This ist calculated by the supplier.

Home Assistant forces me to use a volume sensor for gas. This way, the consumed energy is not respected. Therefore I suggest to implement an alternative sensor in kWh.

OK finally figured this out and it’s pretty insane. Apparently long term statistics database tables have problem with “μ” sign. Two sensors that had their state_class: “measurement” output in μg / m³ and µS/cm were causing database errors. When I set them to state_class: “none” everything is back up again. None of the energy stats are lost in the process…all working normal :smiley:

That sounds like the problem I had with the sensors saying they changed from EUR to GBP, I had to edit the DB to fix it.

Glad you got it sorted, I need to look into getting my gas fed in.

Do you mean for example.

Pond pump is a known “100w” so if the pump is on record the 100w for however long it is on into an integration sensor to get kWh you can then use in the energy panel for example.

There is probably an easy way to do it in the yaml but I use node red for most things, you could do something like this.

image

Grab the state of the plug on/off then use a change node

image

If it is on it will output 100W, if it is off it will output 0W, then feed that into a new pond pump power entity that will end up in HA.

You can then feed that new sensor into the integration component to create your pond pump energy in kWh.

1 Like

I don’t want to measure it as it is mostly constant anyways. I am looking for something like https://github.com/bramstroker/homeassistant-powercalc just less sophisticated and with HA core functionality preferably.

Exactly what I am looking for, just with HA core functionality :wink:

@jmtatsch

Make a template sensor outputting a numeric value (watts) based on the state of the appliance.
Then use that template sensor as the source for an integration sensor

{%if is_state('light.garage','on') %}
  100
{% else %}
  0
{% endif %}
2 Likes

I have solar power and battery. measuring all the inputs and outputs, but via Modbus and created my own enteties. Would like the support to add wich sensor I want to the energy panel

Using a template sensor you can add whatever you like as long as it meets the correct criteria.

Does it measure power, energy or both.

Watts, Wh or kWh.

I have a solar sensor for production in power (watts) - feed that into a integration sensor to create a kWh energy sensor.

I have a sensor for total house consumption in power (watts) - fed that into a another integration sensor.

Basically what ever you have got sensor wise you need to ensure you have or can create energy sensors likely all in kWh to make it easy.

If you post what one of your sensors looks like people should be able to help

I have these sensors, maybe some more: