nordpool
nordpool copied to clipboard
Make sensor settings editable (OptionHandler)
It would be nice if it was possible to edit the sensor setup data.
Right now you can only setup the sensor data when creating it, and if you want to change some setting, you need to delete the sensor and make it again, with the new data.
I would suggest, either putting the settings in a "text file" that can be edited or make the sensor data editable from the GUI.
The old way of setting it up using yaml is still supported. But you can’t mix yaml and config flow.
+1 for adding option handler to configure the integration in UI. Just showing the configured values would be a good start
I have a weird issue. I have not set VAT when installing the plugin, and later on I have configured in the yaml with VAT. The end result it I get two entities: ne with VAT, one without. Only the one without VAT is displayed under the integration. The other one is in the general entity list, but not displayed under the integration.
How do I sort this mess out?
@Hellowlol are there any showstoppers for implementing Options support?
I would love to help out if I can
from looking at the code it seems that entity id is derived from configuration.
Probably need a major rewrite since changing these tough options would generate a new entity.
It would be nice if softer things like lowprice_cutoff and VAT was editable through Options and thus not included in entity id.
Any thoughts on this @Hellowlol?
Hmm. The only thing that needs to be set initially is currency. The rest should be easy to change. We do need another logic for creating ids.
your welcome to send a pr if you want
The huge problem is actually the additional costs
In Denmark the tarifs have 4 steps per day and the actual amount changes each month. And politicians also change the tax
you have to adjust the additionals almost monthly. Below is my current additional cost
I have had to experiement and tweaking the numbers to match the app from the supplier. I had to restart Home Assistant at least 20 times just yesterday because the only way you can edit this is in yaml and the only way to reload yaml based integration is a restart.
and it is not possible to edit this in a UI added sensor. In fact the UI sensor is in my view useless unless all you want is the raw Nordpool price.
We really need to be able to edit this in the UI. Both at creation and changing it.
additional_costs: >
{% if now().month >= 1 and now().month <= 1 %}
{% if now().hour >=0 and now().hour < 6 %}
{{0.42|float}}
{% elif now().hour >=6 and now().hour < 17 %}
{{0.843|float}}
{% elif now().hour >=17 and now().hour < 21 %}
{{2.12|float}}
{% else %}
{{0.843|float}}
{% endif %}
{% elif now().month >= 2 and now().month <= 3 %}
{% if now().hour >=0 and now().hour < 6 %}
{{0.4129|float}}
{% elif now().hour >=6 and now().hour < 17 %}
{{0.8723|float}}
{% elif now().hour >=17 and now().hour < 21 %}
{{2.0959|float}}
{% else %}
{{0.8723|float}}
{% endif %}
{% elif now().month >= 4 and now().month <= 6 %}
{% if now().hour >=0 and now().hour < 6 %}
{{0.4129|float}}
{% elif now().hour >=6 and now().hour < 17 %}
{{0.5278|float}}
{% elif now().hour >=17 and now().hour < 21 %}
{{1.0779|float}}
{% else %}
{{0.5278|float}}
{% endif %}
{% else %}
#tarifs after june 2023 not available
{{0|float}}
{% endif %}
It would be very nice to change the configuration via the UI. In order to update the additional costs annually.
Many integrations offer a reconfigure option to revisit the options
Also voting for a reconfiguration option in UI. Need to change cost template
Also voting for a reconfiguration option in UI. Need to change cost template
Yes, same here, tax is changed
+1
What is the workflow now to change sensor settings (trying to switch from EUR -> cents) when it has been configured through UI?
PS. It would be helpful to note on the setup instructions that settings set via UI can not be changed afterwards! I regret using the UI :D
Create a new sensor in yaml so you have control. And remove the old. The integration can work with mix of yaml and UI sensors. The yaml you can change later. The UI sensors you have to delete and create a new.