diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..eb63b08 --- /dev/null +++ b/.env.example @@ -0,0 +1,30 @@ +# Telegram + +TELEGRAM_BOT_TOKEN = +TELEGRAM_personA_chat_id = +TELEGRAM_personB_chat_id = + +# MQTT +MQTT_BROKER = "192.168.103.44" + +# ha_connection +HA_AUTHORIZATION = +HA_URL = http://192.168.103.44:8123/api/states/ + +# weather +WEATHER_LONG = 9.030724 +WEATHER_LAT = 51.500005 + +# tibber +TIBBER_ACCESS_TOKEN = + +# inverter +INVERTER.URL = 192.168.178.7 + +# solcast +SOLCAST_API_KEY = '' +LONGITUDE = 9.030724 +LATITUDE = 51.500005 +DECLINATION = 35 +AZIMUTH = 160 +KWP = 5.67 diff --git a/minutely.py b/minutely.py index 9277261..a9b1fd1 100644 --- a/minutely.py +++ b/minutely.py @@ -47,7 +47,7 @@ def battery(): if mybattery.getPVProduction() < mybattery.getTotalHomeConsumption(): print('Consumption is higher than production') - if hourly_values[current_hour]['load_battery'] == None: + if hourly_values[current_hour]['load_battery'] is None: print(timestamp,'energy is neither expensive nor cheap. Hold SOC') mybattery.load_battery_1min(0) else: