From 35f1656c243b566bb745a8b85a26faea4ad50c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Mon, 8 Apr 2019 19:49:50 +0200 Subject: [PATCH] Initial commit. --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++ dummy-entity-row.js | 5 +++++ 2 files changed, 54 insertions(+) create mode 100644 README.md create mode 100644 dummy-entity-row.js diff --git a/README.md b/README.md new file mode 100644 index 0000000..af47f64 --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +dummy-entity-row +================ + +An entity row that displays only an icon and the name of an entity. No controls. + +# Installation instructions + +This card requires [card-tools](https://github.com/thomasloven/lovelace-card-tools) to be installed. + +For installation instructions [see this guide](https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins). + +The recommended type of this plugin is: `js` + +### If you are using [custom\_updater](https://github.com/custom-components/custom_updater): +```yaml +resources: +- url: /customcards/github/thomasloven/dummy-entity-row.js?track=true + type: js +``` + + +# Usage instructions + +This is probably most useful as a header for [fold-entity-row](https://github.com/thomasloven/lovelace-fold-entity-row). + +``` +type: entities +entities: + - type: custom:dummy-entity-row + entity: light.bed_light + - type: custom:dummy-entity-row + entity: sun.sun + icon: mdi:home-assistant + name: Home Assistant + - type: custom:dummy-entity-row + entity: sun.sun + icon: mdi:this-icon-does-not-exist + name: No icon + - type: custom:dummy-entity-row + entity: sun.sun + icon: mdi:home-assistant + name: " " +``` + +![dummy-entity-row](https://user-images.githubusercontent.com/1299821/55743659-29a4aa00-5a33-11e9-81d7-4e094a372350.png) + + +--- +Buy Me A Coffee diff --git a/dummy-entity-row.js b/dummy-entity-row.js new file mode 100644 index 0000000..1a44e60 --- /dev/null +++ b/dummy-entity-row.js @@ -0,0 +1,5 @@ +let HuiGenericEntityRow = customElements.get('hui-generic-entity-row') +class DummyEntityRow extends HuiGenericEntityRow { + setConfig(config) {this.config = config;} +} +customElements.define('dummy-entity-row', DummyEntityRow);