Closed vjooris closed 4 years ago
Do a var_dump() on your variable. I'm betting it's not what you think it is.
Hello,
Thank you for your VERY FAST response.
this is the result of the var_dump()
string(4) "21.5"
Sinds I'm NOT a developper, if you can telle me with I've to code for this ....
Can you paste your code?
You will need to convert that string to a number
yes, this is what I expected, but do you know (I didn't found it on Google) the function to convert text to number ?
Try
$success = $nest->setTargetTemperature((float) $setTmp)
This isn't really an issue with @gboudreau's nest-api, rather you might benefit from studying some PHP programming guides/tutorials.
Try
$success = $nest->setTargetTemperature((float) $setTmp)
This isn't really an issue with @gboudreau's nest-api, rather you might benefit from studying some PHP programming guides/tutorials.
I'd tried float ($setTmp)
without success, but pour syntax works perfectly !
THANK YOU.
P.S. : of course this was not an issue, but just help needed ...
P.S. : of course this was not an issue, but just help needed ...
P.S. : of course this was not an issue, but just help needed ...
This is not the place to ask for help with learning PHP. There are countless forums and resources out there to help you learn to program. Continuing to open issues on projects to ask for help with unrelated problems is an abuse of maintainer time. Please stop and do some basic research.
ok, I'm do not want to abuse anyone. I thought here was the best place to ask a specific question on the development. I already searched on Google without success.... I'll stop asking questions. Anyway, thank you for your help
Hello, I'm developing a php based on your class. (this class is GREAT) I would like to pass variable $setTmp = 20.5 (this variable contains the target temperature I want to set. if I enter
$success = $nest->setTargetTemperature($setTmp);
, into my php code, I've a "nice" 500 error. but with$success = $nest->setTargetTemperature(20.5);
it works perfectly.Is it possible to pass a variable ? Thank you