Euro symbol € (with efergy energy monitor)

Hi All,

When trying to configure my energy monitor to use the € euro symbol instead of the $ seemed to cause everything to crash. Took me a while to figure out where it was going wrong, but as soon as I put the €euro back to $USD again things worked fine.

Not running the latest version of HA on the raspberry-pi so this may have been already resolved, sorry if it was.

kindest regards.

YAML and HA are very sensitive to non-UTF-8 characters so when you use things like the euro symbol or the degree symbol, you have to format them properly or else they hose everything.

There’s a couple of ways around this, one of them is to use an editor that saves in UTF-8 format like SublimeText. That’s how I solved it when I ran into this problem myself. (In fact, a pull request had to be made for this because originally the error message didn’t even tell you what file was causing the problem!)

Sublime has a Save As feature that allows you to save your files in UTF-8 format and in doing so, does the conversion for you.

Another is to use an online converter like https://mothereff.in/utf-8

Another thing you can try, though I haven’t tested it, would be to use the HTML equivalent:

HTML Entity (hex)	€
HTML Entity (named)	€
1 Like

thanks! that’s great to know, i’ll try that out when I get home!

1 Like

I had to find out the hard way, so any time I see someone with this problem I feel personally responsible!

1 Like

This was like one of the first errors I had with home assistant trying to use a degree symbol, I bet most people have ran into this

1 Like

When it happened to me, there was no error trap in place and it was difficult to even tell what the cause was. The reason you can see that the error is related to UTF-8 formatting now is because it happened to me and I raised the issue at Github.

So like I said, it’s kind of personal for me so when I see someone with the issue I know instantly… LOL

1 Like

mine was to put E as symbol/character