Skip to content

Instantly share code, notes, and snippets.

View DavidMStraub's full-sized avatar

David Straub DavidMStraub

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[
{
"/systemStates": "not found"
},
[
{
"id": "/dhwCircuits",
"type": "refEnum",
"references": [
{
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@DavidMStraub
DavidMStraub / mvg-card.js
Created July 13, 2018 14:06
MVG Live custom card for Home Assistant Lovelace UI
class MvgCard extends HTMLElement {
set hass(hass) {
const entityId = this.config.entity;
const state = hass.states[entityId];
const name = state.attributes['friendly_name']
if (!this.content) {
const card = document.createElement('ha-card');
card.header = name;