nordpool icon indicating copy to clipboard operation
nordpool copied to clipboard

Friendly name not used when configured using config_flow

Open fredrikbaberg opened this issue 5 years ago • 3 comments

Version of the custom_component

Version 0.0.3

Configuration


Installed from HACS, using configuration flow, so no YAML to copy.

Region: SE3
Currency: SEK
Friendly name: Elpris

Other values are left at default.

Describe the bug

A clear and concise description of what the bug is.

Setting friendly name during configuration flow (adding through Integrations) does not apply to sensor. I have not tried if it works with yaml.

Debug log


No relevant log. Last lines of sensor:

unit_of_measurement: SEK/kWh
friendly_name: nordpool_kwh_se3_sek_3_10_025
icon: mdi:flash

fredrikbaberg avatar Feb 23 '21 16:02 fredrikbaberg

Thanks. It never seemed to work. I’ll be removing this from the yaml and integration setup. Just rename the sensor in the ui

Hellowlol avatar Mar 01 '21 06:03 Hellowlol

I feel that there is need for friendly_name. You can rename one single nordpool sersor, but I cannot find a way to add two or more individual nordpool sersors without giving sensors unique name using friendly_name.

If you try to add second sensor it will fail (I have renamed mine to sensor.spot_hinta) "Platform nordpool does not generate unique IDs. ID nordpool_kwh_fi_eur_3_10_024 already exists - ignoring sensor.spot_hinta"

I have used my forked version with for friendly_name to allow two nordpool sensors. One is with additional costs and other one is just a bare spot price.

I have modified your latest version with fix that supports friendly_name and created pull request (I hope it's done correctly, my first pull request in GitHub). For some reason after reboot second sensor may not start outputting correct values instantly, until that it works it just shows error "Entity is non-numeric: sensor.XXX". But eventually it works and this fix allows to add several nordpool sensors.

mookkari avatar Aug 17 '21 18:08 mookkari

You just need to add another settings. ATM I just add more digits.

Hellowlol avatar Nov 18 '21 23:11 Hellowlol