homey
Version:
Command-line interface and type declarations for Homey Apps
31 lines (27 loc) • 859 B
HTML
<html>
<head>
<style>
/* Example of a custom CSS class. */
.custom-image-class {
margin: var(--homey-su-3) auto var(--homey-su-5);
}
</style>
</head>
<body class="homey-widget">
<img src="homey-logo.png" alt="Homey logo" class="custom-image-class" />
<p class="homey-text-regular homey-text-align-center">Edit public/index.html and hit refresh.</p>
<script type="text/javascript">
function onHomeyReady(Homey) {
Homey.ready();
// View the settings the user provided if your widget has settings.
console.log('Widget settings:', Homey.getSettings());
// Fetch something from your app.
Homey.api('GET', '/', {})
.then((result) => {
console.log(result);
})
.catch(console.error);
}
</script>
</body>
</html>