Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Friendly name not used when configured using config_flow #66

Open
fredrikbaberg opened this issue Feb 23, 2021 · 3 comments
Open

Friendly name not used when configured using config_flow #66

fredrikbaberg opened this issue Feb 23, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@fredrikbaberg
Copy link

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

@Hellowlol
Copy link
Collaborator

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 Hellowlol added the bug Something isn't working label Mar 1, 2021
@mookkari
Copy link
Contributor

mookkari commented Aug 17, 2021

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.

@Hellowlol
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants