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
| #!/usb/bin/env bash | |
| # Required variables | |
| MQTT_HOST="" # Your mqtt host | |
| MQTT_USERNAME="" # Your mqtt username | |
| MQTT_PASSWORD="" # Your mqtt password | |
| METERS_FILES="" # Location of wmbusmeters.d directory | |
| MQTT_DISCOVERY_PREFIX="homeassistant" |
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
| #!/usr/bin/env python3 | |
| import requests, base64 | |
| from requests.auth import HTTPDigestAuth | |
| from bs4 import BeautifulSoup | |
| import urllib3 | |
| urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | |
| user= '12345678' | |
| password = 'secret' |
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: Overall Power | |
| unit_of_measurement: "W" | |
| device_class: energy | |
| state_class: measurement | |
| state: > | |
| {% set ns = namespace(states=[]) %} | |
| {% for s in states.sensor %} | |
| {% if s.object_id.endswith('_power') and not s.object_id == "overall_power" %} |
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
| [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click* |
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
| goToParentState: function() { | |
| var states = $state.current.name.split('.'); | |
| for (var i = states.length - 1; i > 0; i--) { | |
| var stateName = ''; | |
| for (var j = 0; j < i; j++) { | |
| stateName += states[j] + (((j + 1) < i) ? '.' : ''); | |
| } |