Python app to control appliances depending on the price

Hello everyone,

Since the only way to control devices based on the electricity price in the phone app is in percent of the price average (which does not account for minimum price during the day) I made a small python app with a web interface where you can set cutoff prices in % of the daily price range for different devices (you can create as many as you want and control them all on one page).

The app provides a json with on/off values (1 and 0) for all appliances you create which Thingsplex can get using a GET request. I am using these to have my water heaters run only couple of hours a day when its cheap and set the floor temperature high or low.

For the time being it can only get prices from the Tibber API. Let me know if you find it useful and wether you want some other price provider to be added.

You can get the app here:


I just wanted to say that this looks really cool :smiley: Thank you for sharing this!

1 Like

Updated to version 2.0, if you have a Tibber pulse or Watty i.e. you have access to current power consumption, you can set the max power in kW, and if it gets over the limit, appliances will be switched off based on their priority that you set in the Settings tab. Comes in handy for Norwegian users with the new “capacity” tier based price model for network usage.

If you were using the previous version, delete its cointainer and volumes, since the settings file the app uses now has different structure (contains priority and and power consumption per appliance to enable the power limiting logic)

If you dont have the real-time power meter or don’t want to use the functionality, just keep the Max Power setting at 0 and it will control appliances only based on price.

You can also check how the output JSON looks and what the current power consumption is at the new Status tab