rfg81
March 6, 2023, 9:08pm
1
Hi,
Hope anyone can help me with this problem. So this is the code I have right now:
Utils.toLogger("debug", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: ${response.value}")
def temperature = FormatTemperature(response.value, isFahrenheit())
Utils.toLogger("debug", "bbbbbbbbbbbbbbbbbbbbbb: ${temperature}")
sendEvent(name: "temperature", value: temperature)
Utils.toLogger("debug", "cccccccccccccccc: ${temperature}")
and this is what I get in the log:
So I never get "cccccccccccccccc" in the log, instead I get:
[error]com.hubitat.app.exception.LimitExceededException: Device 370 generates excessive hub load on line 333 (method processChildResponse)
This is what is in the line 333 of the parent driver "device 370"
What am I doing wrong?
@gopher.ny @bobbyD Can anybody help with this?
Thanks for any help!
I have a driver that uses temperature so I am looking at what I have done there.
First I would try defining your temp variable as BigDecimal
BigDecimal temperature = FormatTemperature(response.value, isFahrenheit())
If that does not work you could try wrapping the variable as a string
sendEvent(name: "temperature", value: "${temperature}")
Or possibly this would work (not tested)
sendEvent(name: "temperature", value: (temperature as BigDecimal))
I do know that in both of my drivers the variable I am sending is a BigDecimal, and it works for me.
Nothing particular about that line, creating an event is one of the points in hub code where it checks the load generated by app/driver. The load is created elsewhere.
1 Like
rfg81
March 7, 2023, 2:23pm
5
jtp10181:
BigDecimal
That was not it. Thanks for trying to help.
@gopher.ny I will try to refactor it for optimisation. Thanks
system
Closed
March 6, 2024, 2:23pm
6
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.