This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let switchId = 0; | |
| let url = 'http://10.10.10.10:8123'; | |
| function check(event) { | |
| Shelly.call("HTTP.GET", {url: url, body:{}, timeout: 2 }, function(resp) { | |
| let reachable = (resp && resp.code === 200); | |
| if (!reachable) { | |
| print("override switch behaviour"); | |
| Shelly.call("Switch.Set", { id: event.id, on: event.info.state }, function(){}); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| template: | |
| - sensor: | |
| - name: "Prusa Print Graph Span" | |
| state: > | |
| {% set val = states('sensor.prusamini_print_start') %} | |
| {% if val in ['unknown', 'unavailable', ''] %} | |
| 1h | |
| {% else %} | |
| {%- set hours = (now() - as_datetime(val)).total_seconds() / 3600 -%} | |
| {%- set base = hours | int -%} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type: grid | |
| cards: | |
| - type: heading | |
| heading_style: title | |
| heading: 3D-Drucker Nerd-Stats | |
| icon: mdi:printer-3d-nozzle | |
| - type: custom:config-template-card | |
| grid_options: | |
| columns: full | |
| entities: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type: grid | |
| cards: | |
| - type: heading | |
| heading_style: title | |
| heading: 3D-Drucker Überblick | |
| icon: mdi:printer-3d-nozzle | |
| - type: tile | |
| entity: switch.3d_drucker | |
| icon: carbon:chart-3d | |
| vertical: false |