mirror of
https://github.com/beestat/app.git
synced 2025-07-09 03:04:07 -04:00
Fixed #336 - Downloaded data does not convert to °C
This commit is contained in:
parent
64439f2756
commit
0b12aed7d6
@ -939,6 +939,8 @@ class runtime extends cora\api {
|
|||||||
|
|
||||||
$this->user_lock($thermostat_id);
|
$this->user_lock($thermostat_id);
|
||||||
|
|
||||||
|
$user = $this->api('user', 'get', $this->session->get_user_id());
|
||||||
|
|
||||||
$thermostat = $this->api('thermostat', 'get', $thermostat_id);
|
$thermostat = $this->api('thermostat', 'get', $thermostat_id);
|
||||||
$ecobee_thermostat = $this->api(
|
$ecobee_thermostat = $this->api(
|
||||||
'ecobee_thermostat',
|
'ecobee_thermostat',
|
||||||
@ -1023,8 +1025,9 @@ class runtime extends cora\api {
|
|||||||
if($runtime_sensor['temperature'] !== null) {
|
if($runtime_sensor['temperature'] !== null) {
|
||||||
$runtime_sensor['temperature'] /= 10;
|
$runtime_sensor['temperature'] /= 10;
|
||||||
if(
|
if(
|
||||||
isset($thermostat['setting']['temperature_unit']) === true &&
|
isset($user['settings']['units']) === true &&
|
||||||
$thermostat['setting']['temperature_unit'] === '°C'
|
isset($user['settings']['units']['temperature']) === true &&
|
||||||
|
$user['settings']['units']['temperature'] === '°C'
|
||||||
) {
|
) {
|
||||||
$runtime_sensor['temperature'] =
|
$runtime_sensor['temperature'] =
|
||||||
round(($runtime_sensor['temperature'] - 32) * (5 / 9), 1);
|
round(($runtime_sensor['temperature'] - 32) * (5 / 9), 1);
|
||||||
@ -1089,8 +1092,9 @@ class runtime extends cora\api {
|
|||||||
if($runtime_thermostat[$key] !== null) {
|
if($runtime_thermostat[$key] !== null) {
|
||||||
$runtime_thermostat[$key] /= 10;
|
$runtime_thermostat[$key] /= 10;
|
||||||
if(
|
if(
|
||||||
isset($thermostat['setting']['temperature_unit']) === true &&
|
isset($user['settings']['units']) === true &&
|
||||||
$thermostat['setting']['temperature_unit'] === '°C'
|
isset($user['settings']['units']['temperature']) === true &&
|
||||||
|
$user['settings']['units']['temperature'] === '°C'
|
||||||
) {
|
) {
|
||||||
$runtime_thermostat[$key] =
|
$runtime_thermostat[$key] =
|
||||||
round(($runtime_thermostat[$key] - 32) * (5 / 9), 1);
|
round(($runtime_thermostat[$key] - 32) * (5 / 9), 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user