gboudreau / nest-api

Unofficial Nest Learning Thermostat API
GNU Lesser General Public License v3.0
299 stars 92 forks source link

time_to_target #114

Closed vjooris closed 4 years ago

vjooris commented 4 years ago

N.B. : this is not an issue, but a question

Hi, I keep having some questions, as I'm not a developper, so I need help ...

on my Android tel, when I see (for exile) : more than 2 hours in 2+ hr) time_to_target returns a very big number (1582399960). Wat is the unit of this ? How to get an answer in a format h:mm This my "code": echo "<i>Time to target temperature : </i>".$infos->target->time_to_target."<br>"; Thank you for your help

bauzer714 commented 4 years ago

It's the Unix timestamp.

https://www.unixtimestamp.com/index.php

vjooris commented 4 years ago

OK, I though we get a duration to targe température, but we receive a date & time when target tmp will be ok. So for the duration, I've to substrat this result with now()

bauzer714 commented 4 years ago

You now understand the data response. You can use Google searches to achieve your goal.

bauzer714 commented 4 years ago

@gboudreau please close this. Not an issue.