[APP][Pro] Home Assistant - Community App

In your last screenshot you can see that the first capability is added as measure_power and Jomey rounds in sensor view.
The last entity is measure_numeric (assumed based on the icon) and so it’s not rounded.

Can you please check the entity in your HA developer tools:

  • some type attribute or a unit set?

Please think about the ukit you wang to have in Homey (W or kW).
Based on these informations I can guide you…

Hi,
this app integrated devices of a HomeAssistant smart home system.
Based on your question I assume you don’t have a HomeAssistant system running, right? So this app makes no sense for you :man_shrugging:

Does this help?

1 Like

Yes, exactly what I need.
And now what you want to see in Homey (W or kW - Homey or HA style).

Doesn’t really matter, I’am happy with either W or kW. Let’s go for “W”.
Then it looks as if my solar panels are generating more :stuck_out_tongue:

And therefor: zero decimals

I have homey pro running

Then you don’t need this app. It’s only used to import devices from HomeAssistant to HomeyPro.

Who has recommended this app?
Perhaps someone recommended to use HomeAssistant parallel to HomeyPro to add your devices via HomeAssistant. But I don’t think that’s what you want to do (a second smarthome system).

I have underfloor heating, which has 3 thermostats connected to it. WarmUp 6.i that I would like to connect to my Homey.

Sorry, I can’t help and that’s the wrong thread. Please ask in the ‘devices’ section. Perhaps someone knows these device.

You need a Homey app to add the devices, so please seach in the Homey app store.

This was your answer, in the exact order:

Ok, let’s start :slight_smile:

The Homey app searchs a capability based in the device type or unit. kW doesn’t fit to any Homey capability, so measure_numeric is used (generic number value).

Please do the following steps:

  • remove your capability from your device
  • add your entity again
  • change the capability into “measure_power” (insert manually or select from the autocomplete list). Use a “main” capability (measure_power) without a subcapability (added “.xxx”). This way the capability can be used in other apps like PowerByTheHour. But you can have only one capability with this name. To add another one, you have to use subcapabilities or create a second device.
  • Set the unit to “W”
  • add a converter to calculate the value:
    (value) => { return Math.round(parseFloat(value) * 1000); }
    x1000 to get Watt and then round to 0 decimal places

1 Like

Perfect; seems to work flawlessly!! :heart_eyes: :star_struck:
Two questions:

  • What would be the correct syntax to multiply AND have three decimals? (value) => { return Math.round(parseFloat(value) * 1000 . 3); } doesn’t seem to do the trick
  • Where can I start to learn everything there is to learn about these syntaxes? Is this Python, Yaml, Java?

Try comma 3, not dot 3
Like:
{ return Math.round(parseFloat(value) * 1000,3); }

Mathjs.org

It’s JavaScript, the same you can use in HomeyScript.

Math.round( ) only rounds to a full number (0 decimals). You have to calc:
Math.round( value * 1000) / 1000 to get 3 decimals.

In your example:
(value) => { return Math.round(parseFloat(value) *1000 * 1000)/1000; }

Thank you all!
I will though have to study hard and long.
Best result I got was two decimals coming from:

1 Like

If your converter is not working (syntax error etc), you can see a error message in app log (repair view).

The converter is technically a function with one parameter “value”.
The value is the content of the entity state (if an entity was added) or the attribute value (if an entity attribute was added).
The real value you can see in HA developer tools. Sometimes the HA dashboard displays a converted value (rounded…).

2 Likes

Since none of the above syntaxes are 100% without errors, I begin to suspect that this might be a very high :mountain_snow: mountain :mountain_snow: to climb for someone who considers this just a hobby. :sweat_smile:

I am beginnig to suspect that I will never win a beauty contest with my wonky integrations :crazy_face:

If you need an example for other converters, just ask :wink:

I see… Then it makes sence… :smiley:

Thanks, I wasn’t sure if it already works on Homey based on the NodeJS version.

1 Like