function printEventInformation(Netatmo\Objects\NAEvent $event, $tz) { printTimeInTz($event->getTime(), $tz, "j F H:i"); $message = removeHTMLTags($event->getMessage()); echo ": " . $message . "\n"; }
/** * @param array data : dashboard_data of a device or module * @param string $tz : timezone * @brief : print general data of a device in HTML */ function printDashboardDataInHtml($data, $tz) { foreach ($data as $key => $value) { echo "<p>"; echo $key . ": "; if ($key === 'time_utc' || preg_match("/^date_.*/", $key)) { printTimeInTz($value, $tz, 'j F H:i'); } else { echo $value; printUnit($key); } echo "</p>"; } }