Created
March 7, 2021 16:34
-
-
Save jeroenboumans/decd031b8211aee0480120d3c078c2ea to your computer and use it in GitHub Desktop.
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 python | |
| import time | |
| import asyncws | |
| import asyncio | |
| import threading | |
| import json | |
| token = HASS_IO_AUTHORIZATION_TOKEN # fill in your token | |
| host = HASS_IO_HOSTNAME_OR_URL # fill in your Home Assistant IP-address or domain | |
| port = 8123 | |
| cache = {} | |
| entities = [ | |
| "sensor.power_tariff", | |
| "sensor.power_consumption_watt", | |
| "sensor.gas_consumption" | |
| ... | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment