Skip to content

Instantly share code, notes, and snippets.

@antpk
antpk / pw+octopus.md
Last active September 21, 2025 14:44
Home Assistant Setup for Tesla Powerwall & Intelligent Octopus Go

Home Assistant Setup for Tesla Powerwall & Intelligent Octopus Go

This guide provides the complete YAML code and setup instructions for a robust system to manage your Tesla Powerwall charging with an Intelligent Octopus Go tariff in Home Assistant.

The goal is to charge the Powerwall from the grid during bonus cheap rates, while intelligently handling transition periods and preventing API spam from rapid sensor state changes.

Prerequisites

Before you begin, ensure you have the following set up in Home Assistant:

@antpk
antpk / SQL-Insert-Statements-Bulk-100per.sql.groovy
Created March 7, 2019 06:55
SQL Bulk insert export script for DataGrip with limit
SEP = ", "
QUOTE = "\'"
NEWLINE = System.getProperty("line.separator")
KEYWORDS_LOWERCASE = com.intellij.database.util.DbSqlUtil.areKeywordsLowerCase(PROJECT)
KW_INSERT_INTO = KEYWORDS_LOWERCASE ? "insert into " : "INSERT INTO "
KW_VALUES = KEYWORDS_LOWERCASE ? "values" : "VALUES"
KW_NULL = KEYWORDS_LOWERCASE ? "null" : "NULL"