├── example.JPG
├── hacs.json
├── changelog.md
├── info.md
├── README.md
└── shutter-cover-panel-card.js
/example.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/madmicio/shutter-cover-panel-card/HEAD/example.JPG
--------------------------------------------------------------------------------
/hacs.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "shutter cover panel card",
3 | "content_in_root": true,
4 | "filename": "shutter-cover-panel-card.js",
5 | "render_readme" : true
6 | }
7 |
--------------------------------------------------------------------------------
/changelog.md:
--------------------------------------------------------------------------------
1 | ### ADDED
2 |
3 | - coverdistance: (now you can set between cover)
4 |
5 | ### ADDED
6 |
7 | - borderradius: (now you can set cover border-radius value)
8 | - buttonborderradius: (now you can set button border-radius value)
9 |
--------------------------------------------------------------------------------
/info.md:
--------------------------------------------------------------------------------
1 | # NOTE: need in "your-theme.yaml"
2 | ```yaml
3 | #button
4 | active-background-button-color: '#0080ff'
5 | deactive-background-button-color: "#f2f0fa"
6 | button-border-standard: rgba(0, 128, 255, .5)
7 | state-icon-active-color: "#0080ff"
8 | ```
9 | # Shutter Cover Panel Card
10 | 
11 |
12 |
13 | # locelace config example
14 |
15 | **panel: true** REQUIRED
16 | ```yaml
17 | - title: ''
18 | panel: true
19 | path: shutter
20 | icon: 'mdi:window-shutter'
21 | badges: []
22 | cards:
23 | - type: 'custom:shutter-cover-panel-card'
24 | title: Tapparelle
25 | innershadow: noenable
26 | iconemboss: noenable
27 | entities:
28 | - entity: cover.salone
29 | name: Salone
30 | - entity: cover.veneziana
31 | - entity: cover.porta_cucina
32 | name: Porta Cucina
33 | - entity: cover.cucina
34 | name: Cucina
35 | - entity: cover.sofia
36 | name: Sofia
37 | - entity: cover.camera_matrimoniale
38 | name: Matrimoniale
39 | - entity: cover.emma
40 | name: Emma
41 | sidebuttons:
42 | - entity: script.apri_tutto
43 | name: Apri Tutto
44 | label: tapparelle
45 | icon: 'mdi:window-shutter-open'
46 | cardtype: script
47 | - entity: script.chiudi_tutto
48 | name: Chiudi Tutto
49 | label: tapparelle
50 | icon: 'mdi:window-shutter'
51 | cardtype: script
52 | - entity: automation.chiusura_tapparella_alba
53 | name: chiusura invernale
54 | label: automazione
55 | icon: 'mdi:weather-sunset-up'
56 | cardtype: button
57 | - entity: automation.chiusura_tapparelle_invernale
58 | name: chiusura invernale
59 | label: automazione
60 | icon: 'mdi:weather-sunset-down'
61 | cardtype: button
62 | ```
63 | **NOTE: if you do not need the buttons in the right column of the card you must still enter the following code**
64 | ```yaml
65 | sidebuttons:
66 | - entity: null
67 | ```
68 | ## hacs install
69 |
70 | 1. install `shutter-cover-panel-card.js` plugin
71 |
72 | 2. Add a reference to `shutter-cover-panel-card.js` inside your `ui-lovelace.yaml` or at the top of the *raw config editor UI*:
73 |
74 | ```yaml
75 | resources:
76 | - type: module
77 | url: /hacsfiles/shutter-cover-panel-card/shutter-cover-panel-card.js
78 | ```
79 |
80 | ## Install
81 |
82 | ### Manual install
83 |
84 | 1. Download and copy `shutter-cover-panel-card.js` from (https://github.com/madmicio/shutter-cover-panel-card) into your `config/www` directory.
85 |
86 | 2. Add a reference to `shutter-cover-panel-card.js` inside your `ui-lovelace.yaml` or at the top of the *raw config editor UI*:
87 |
88 | ```yaml
89 | resources:
90 | - url: /local/shutter-cover-panel-card.js?v=1
91 | type: module
92 | ```
93 |
94 | ### Main Options
95 | | Name | Type | Default | Supported options | Description |
96 | | -------------- | ----------- | ------------ | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
97 | | `type` | string | **Required** | `custom:shutter-cover-panel-card` | Type of the card |
98 | | `entities` | string | **Required** | entity | list of entitity |
99 | | `innershadow` | | enable | enable/disable | enable - disable innershadow in the card |
100 | | `iconemboss` | | enable | enable/disable | enable - disable icon emboss effect |
101 | | `covercolor` | | "#0080ff" | your color | define the cover color |
102 | | `coverbackground` | | "#f2f0fa" | your color | define the background cover color and up-stop-downbuttos background color |
103 | | `background` | | tranpsarent | your color | define the background card color |
104 | | `coverWidth` | | 100px | | define the cover width |
105 | | `coverheight` | | 300px | | define the cover height |
106 | | `title` | | string | | card title |
107 | | `countText` | | aperte | | text after numer of open covers |
108 | | `borderradius` | | 15px | | cover border-radius value |
109 | | `buttonborderradius` | | 15px | | buttons border-radius value |
110 | | `coverdistance` | | 150px | | set distance between cover |
111 | | `sidebackground` | | "#f6f5fa" | | set sidebar background |
112 |
113 | ### entity Options
114 | | Name | Type | Default | Supported options | Description |
115 | | -------------- | ----------- | ------------ | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
116 | | `entities` | string | **required** | entity | entity_id |
117 | | `name` | string | optional | string | Define the name of the cover or automatically it takes the friendly name |
118 |
119 | ### side buttons Options
120 | | Name | Type | Default | Supported options | Description |
121 | | -------------- | ----------- | ------------ | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
122 | | `entity` | string | **require** | entity | entity_id |
123 | | `name` | string | optional | string | Define the name of the button |
124 | | `icon` | string | optional | `mdi:icon` | Icon to display. Will be overriden by the icon defined in a state |
125 | | `type` | string | **Required** | script / button | define the card style and function. in script mode it doesn't change appearance, just click effect , in button mode the icon becomes a button to activate / deactivate the entity ||
126 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Shutter Cover Panel Card
2 |
3 | [](https://github.com/custom-components/hacs)
4 | [](https://www.buymeacoffee.com/madmicio)
5 |
6 | 
7 |
8 |
9 | # locelace config example
10 |
11 | **panel: true** REQUIRED
12 | ```yaml
13 | - title: ''
14 | panel: true
15 | path: shutter
16 | icon: 'mdi:window-shutter'
17 | badges: []
18 | cards:
19 | - type: 'custom:shutter-cover-panel-card'
20 | title: Tapparelle
21 | innershadow: noenable
22 | iconemboss: noenable
23 | entities:
24 | - entity: cover.salone
25 | name: Salone
26 | - entity: cover.veneziana
27 | - entity: cover.porta_cucina
28 | name: Porta Cucina
29 | - entity: cover.cucina
30 | name: Cucina
31 | - entity: cover.sofia
32 | name: Sofia
33 | - entity: cover.camera_matrimoniale
34 | name: Matrimoniale
35 | - entity: cover.emma
36 | name: Emma
37 | sidebuttons:
38 | - entity: script.apri_tutto
39 | name: Apri Tutto
40 | label: tapparelle
41 | icon: 'mdi:window-shutter-open'
42 | cardtype: script
43 | - entity: script.chiudi_tutto
44 | name: Chiudi Tutto
45 | label: tapparelle
46 | icon: 'mdi:window-shutter'
47 | cardtype: script
48 | - entity: automation.chiusura_tapparella_alba
49 | name: chiusura invernale
50 | label: automazione
51 | icon: 'mdi:weather-sunset-up'
52 | cardtype: button
53 | - entity: automation.chiusura_tapparelle_invernale
54 | name: chiusura invernale
55 | label: automazione
56 | icon: 'mdi:weather-sunset-down'
57 | cardtype: button
58 | ```
59 | **NOTE: if you do not need the buttons in the right column of the card you must still enter the following code**
60 | ```yaml
61 | sidebuttons:
62 | - entity: null
63 | ```
64 |
65 | # NOTE: need in "your-theme.yaml"
66 | ```yaml
67 | #button
68 | active-background-button-color: '#0080ff'
69 | deactive-background-button-color: "#f2f0fa"
70 | button-border-standard: rgba(0, 128, 255, .5)
71 | state-icon-active-color: "#0080ff"
72 | ```
73 |
74 | ## hacs install
75 |
76 | 1. install `shutter-cover-panel-card.js` plugin
77 |
78 | 2. Add a reference to `shutter-cover-panel-card.js` inside your `ui-lovelace.yaml` or at the top of the *raw config editor UI*:
79 |
80 | ```yaml
81 | resources:
82 | - type: module
83 | url: /hacsfiles/shutter-cover-panel-card/shutter-cover-panel-card.js
84 | ```
85 |
86 | ## Install
87 |
88 | ### Manual install
89 |
90 | 1. Download and copy `shutter-cover-panel-card.js` from (https://github.com/madmicio/shutter-cover-panel-card) into your `config/www` directory.
91 |
92 | 2. Add a reference to `shutter-cover-panel-card.js` inside your `ui-lovelace.yaml` or at the top of the *raw config editor UI*:
93 |
94 | ```yaml
95 | resources:
96 | - url: /local/shutter-cover-panel-card.js?v=1
97 | type: module
98 | ```
99 |
100 | ### Main Options
101 | | Name | Type | Default | Supported options | Description |
102 | | -------------- | ----------- | ------------ | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
103 | | `type` | string | **Required** | `custom:shutter-cover-panel-card` | Type of the card |
104 | | `entities` | string | **Required** | entity | list of entitity |
105 | | `innershadow` | | enable | enable/disable | enable - disable innershadow in the card |
106 | | `iconemboss` | | enable | enable/disable | enable - disable icon emboss effect |
107 | | `covercolor` | | "#0080ff" | your color | define the cover color |
108 | | `coverbackground` | | "#f2f0fa" | your color | define the background cover color and up-stop-downbuttos background color |
109 | | `background` | | tranpsarent | your color | define the background card color |
110 | | `coverWidth` | | 100px | | define the cover width |
111 | | `coverheight` | | 300px | | define the cover height |
112 | | `title` | | string | | card title |
113 | | `countText` | | aperte | | text after numer of open covers |
114 | | `borderradius` | | 15px | | cover border-radius value |
115 | | `buttonborderradius` | | 15px | | buttons border-radius value |
116 | | `coverdistance` | | 150px | | set distance between cover |
117 | | `sidebackground` | | "#f6f5fa" | | set sidebar background |
118 |
119 | ### entity Options
120 | | Name | Type | Default | Supported options | Description |
121 | | -------------- | ----------- | ------------ | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
122 | | `entities` | string | **required** | entity | entity_id |
123 | | `name` | string | optional | string | Define the name of the cover or automatically it takes the friendly name |
124 |
125 | ### side buttons Options
126 | | Name | Type | Default | Supported options | Description |
127 | | -------------- | ----------- | ------------ | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
128 | | `entity` | string | **require** | entity | entity_id |
129 | | `name` | string | optional | string | Define the name of the button |
130 | | `icon` | string | optional | `mdi:icon` | Icon to display. Will be overriden by the icon defined in a state |
131 | | `type` | string | **Required** | script / button | define the card style and function. in script mode it doesn't change appearance, just click effect , in button mode the icon becomes a button to activate / deactivate the entity ||
132 |
133 |
134 |
135 |
--------------------------------------------------------------------------------
/shutter-cover-panel-card.js:
--------------------------------------------------------------------------------
1 | import {
2 | LitElement,
3 | html,
4 | css
5 | } from "https://unpkg.com/lit-element@2.0.1/lit-element.js?module";
6 | class ShutterCoverPanelcard extends LitElement {
7 |
8 | static get properties() {
9 | return {
10 | hass: {},
11 | config: {},
12 | active: {}
13 | };
14 | }
15 |
16 | constructor() {
17 | super();
18 | }
19 |
20 | render() {
21 | var coverWidth = this.config.coverWidth ? this.config.coverWidth : "100px";
22 | var coverHeight = this.config.coverHeight ? this.config.coverHeight : "300px";
23 | var innershadow = this.config.innershadow == "enable" ? true : false;
24 | var iconemboss = this.config.iconemboss == "enable" ? true : false;
25 | var countText = this.config.countText ? this.config.countText : "aperte";
26 | var entityCounter = 0;
27 | var background = this.config.background ? this.config.background : "transparent";
28 | var sidebackground = this.config.sidebackground ? this.config.sidebackground : "#f6f5fa";
29 | var covercolor = this.config.covercolor ? this.config.covercolor : "#0080ff";
30 | var coverbackground = this.config.coverbackground ? this.config.coverbackground : "#f2f0fa";
31 | var borderradius = this.config.borderradius ? this.config.borderradius : "15px";
32 | var buttonborderradius = this.config.buttonborderradius ? this.config.buttonborderradius : "15px";
33 | var coverdistance = this.config.coverdistance ? this.config.coverdistance : "150px";
34 |
35 |
36 | return html`
37 |