Bepacom-Raalte / Bepacom-BACnet-IP-Integration

Bepacom BACnet Integration Repository
Apache License 2.0
12 stars 2 forks source link

Two different types of decimal separators in my BACnet Integration #21

Closed CV-Private closed 8 months ago

CV-Private commented 8 months ago

My BACnet Integration shows two different types of decimal separators. Editable fields are shown with decimal point, whereas non-editable values are shown with a comma instead.

This might be related to HA itself or to my PC settings, but since I don't have any other editable device in my HA, I'm only seeing it with BACnet objects. Any idea why?

image

There is actually a setting for number formats in the User Profile in HA, therefore I think that it should be uniformly used everywhere in HA.

image

My setting is Auto and the Language setting is German, so I would expect to see the comma as the decimal separator. It is shown like that in Dashboard cards for temperature settings, for example:

image

Bepacom-Raalte commented 8 months ago

I think this is a Home Assistant issue, as I can't do anything to control whether it's a comma or a dot. The browser might also play a hand at it, as when I have my language in English (GB), when I change a number the value changes from dot notation to comma.

CV-Private commented 8 months ago

Ok, thanks! By the way, I noticed it while trying to parse the state of a BACnet object.

The (experimental) template below translates the presentValue of Entity VarApStatus to the text shown on the control panel of my heatpump. The template relies on strings, therefore the decimal separator matters.

image

image

The template works fine so far. Now I need to add all other possible states.

Bepacom-Raalte commented 8 months ago

I think internally it's all with dots, but I'm not the best at making templates so I wouldn't know for sure.