#Automation sets value as float as first and then floored immediately after

1 messages · Page 1 of 1 (latest)

thin edge
#

https://imgur.com/a/rIjXAcb
In the trace it looks like the automation is setting it twice, but i'm not actually quite sure how to interpret it

#

would very much appreciate any pointers^^

red flicker
#

Does the numberentity actually support a float?

thin edge
red flicker
#

It almost certainly only supports whole numbers

thin edge
#

there's also something exposed on the device via MQTT to set the value, but i haven't been able to make that work with a jinja2 template to actually set the value

#

like this as the action:

device_id: 9c3e6715d9308bb4e7b7b3fd76109115
domain: number
entity_id: number.thermostat_external_measured_room_sensor
type: set_value
value: ???

and here the value field expects a float, but I don't know how to use a template here

red flicker
#

Use the service call, not the device action

#

Device actions don't support templates

thin edge
#

okay, service call is what i'm doing i think (in my initial post)
https://hastebin.com/anasokamal
hmm, do you think this could be misconfigured on zigbee2mqtt's side?
the type is just reported as numeric

#

it would be very weird for the device to not support floats there, that's why i'm sceptical

red flicker
#

Why would it be weird?

thin edge
#

temp in whole degrees isn't very accurate, and it reports its own temps with two decimal points
although it doesn't make much sense to me, in the manufacturer docs: https://assets.danfoss.com/documents/193613/AM375549618098en-000102.pdf they list int16 for that value (local temperature) too, just like the one i'm trying to set (External Measured Room Sensor)

#

also because they say to "update the value every 0.1k change"

red flicker
#

It could be a limitation of Z2M shrug

#

(or more accurately, the converter written for it in Z2M)

thin edge
#

do you happen to know from where home assistant takes the information that it's integers only?

red flicker
#

I'd guess it's in the attributes of the entity

#

For instance, I see one that lists

min: 2
max: 65535
step: 1
thin edge
#

ahh okay! thanks, I'll check that later

thin edge
#

yeahh it's step: 1

min: -8000
max: 3500
step: 1
mode: auto```
thin edge
#

I got it, I kind of read over it in the manual, I need to multiply the value *100