Feature Request: Add power that is set for each time block
Closed this issue ยท 15 comments
We should add an option that will enable the users to provide the power in W for all 5 time blocks. That would mean we need to introduce an additional sensor that will output the power (W) for the current time block.
This should involve a seperate values (W) for each tariff block, and then display as sensor attributes as tariff changes?
I can add additional setup options via config.yaml, where users can add/edit their W limits.
I'm not sure if such values exist in moj elektro api... It would be great to make this some how semi-automatic.
Good point. As a matter of fact, we can get this on mojelektro API.
We can get this with GET https://api.informatika.si/mojelektro/v1/merilna-tocka/{gsrn}
This is a snippet of the response:
{ "dobavitelj": { "datumDo": "9999-12-31", "datumOd": "2011-01-01", "eic": "11XIGET--------D", "naziv": "GEN-I D.O.O.", "oznaka": 10021 }, "dogovorjeneMoci": [ { "casovniBlok1": "0.0", "casovniBlok2": "0.0", "casovniBlok3": "0.0", "casovniBlok4": "0.0", "casovniBlok5": "0.0", "datumDo": "2024-12-31T00:00:00Z", "datumOd": "2024-01-01T00:00:00Z", "datumVnosa": "2023-06-11", "nacinDolocitve": "DISTRIBUTER", "novUporabnik": true, "oznakaIzracuna": "M1", "veljavnost": false }, { "casovniBlok1": "7.2", "casovniBlok2": "8.1", "casovniBlok3": "8.1", "casovniBlok4": "8.1", "casovniBlok5": "8.1", "datumDo": "2024-12-31T00:00:00Z", "datumOd": "2024-01-01T00:00:00Z", "datumVnosa": "2023-07-06", "nacinDolocitve": "DISTRIBUTER", "novUporabnik": false, "oznakaIzracuna": "M1", "veljavnost": false }, { "casovniBlok1": "7.4", "casovniBlok2": "8.1", "casovniBlok3": "8.1", "casovniBlok4": "8.1", "casovniBlok5": "8.1", "datumDo": "2024-12-31T00:00:00Z", "datumOd": "2024-01-01T00:00:00Z", "datumVnosa": "2023-07-24", "minimalnaMoc": "4.6", "nacinDolocitve": "DISTRIBUTER", "novUporabnik": false, "oznakaIzracuna": "M1", "prikljucnaMoc": "17.0", "veljavnost": true } ], . . . }
So we can parse casovniBlok1, casovniBlok2, casovniBlok3, casovniBlok4, casovniBlok5 where veljavnost = true
Is this something you can add to mojelektro plugin? Users would need to input also gsrn.
Is this something you can add to mojelektro plugin? Users would need to input also gsrn.
Yes, this should be part of Moj Elektro API component. Will take a look.
Also the gsrn can be parsed with just meter_id, but it needs needs two requests.
Is this something you can add to mojelektro plugin? Users would need to input also gsrn.
Yes, this should be part of Moj Elektro API component. Will take a look. Also the gsrn can be parsed with just meter_id, but it needs needs two requests.
It can be yes, just bear in mind that users can have multiple gsrn's. I have two and only one has the block defined.
I have one under identifikator
(GSRN MM)
and one under merilneTocke
(GSRN MT)
Do yo have more than this two?
Maybe vrsta = OMTO is the key but I'm not sure.
Strange but yeah, i think OMTO is the key.
power limit could be probably set also manually..
power limit could be probably set also manually..
No need if we are going to get this from mojelektro.
Do you have any timeline when it will be done?
Use a template sensor in the meantime.
You can just create new helper ->template -> template a sensor
put this code into the template and change your block power from 17000 to your liking.
{% if states('sensor.elektro_network_tariff') == '1' %}{% set blok = 17000 %}
{% elif states('sensor.elektro_network_tariff') == '2' %}{% set blok = 17000 %}
{% elif states('sensor.elektro_network_tariff') == '3' %}{% set blok = 17000 %}
{% elif states('sensor.elektro_network_tariff') == '4' %}{% set blok = 17000 %}
{% elif states('sensor.elektro_network_tariff') == '5' %}{% set blok = 17000 %}
{% endif %}
{{ blok }}
Feature added to mojelektro plugin frlequ/homeassistant-mojelektro#19