Repository navigation
Docs: HA + Predbat setup as deployed, Python 3.12, systemd service - #51
Merged
Merged
Conversation
MQTT_TOPICS.md's Predbat example pointed scheduled_*_enable at input_booleans, which Predbat's apps.yaml validation rejects; it now uses the template switch wrappers that run in production. Also: scripts.yaml without the `script:` key, the full apps.yaml mapping (sensors, prices, PV forecast, currency, sizes), freeze_charge passing target_soc, 3600 W rate helpers, and no references to the author's private HA repo. README: Python 3.12+ requirement, the stale "poor-man's config in main.py" step removed (everything is in .env), the tested hardware, the Solcast east/west assumption, and how to run it as a systemd user service. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 task done
2 tasks done
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
I went through the README and
MQTT_TOPICS.mdas a newcomer would, starting from a fresh clone, before linking the repo on the elektrowoz.pl forum. The setup wouldn't have gone through:apps.yaml:scheduled_charge_enable/scheduled_discharge_enablepointed atinput_booleans, which its validation doesn't accept for entities it writes. Since 2026-09-28 production has wrapped them in template switches, but the docs never caught up.pip installfails on Python 3.9 (click==8.5.0). The pins need 3.12+ because of numpy 2.5.2. Nothing said so.main.py" is stale: everything is in.envnow.scripts.yamlhad ascript:key, which doesn't belong in that file;apps.yamlexample only had the inverter part (nosoc_percent, power sensors, prices, PV forecast or currency);What
MQTT_TOPICS.md, "Home Assistant + Predbat example": now matches what runs on my Pi.apps.yamlpointing atswitch.goodwe_scheduled_*;scripts.yamlwith top-level script ids. It forwardstarget_socforfreeze_charge, andcharge_freeze_servicepasses it. That's for Hold charging: freeze_charge with a target below the SoC discharges down to it #50; without Hold charging: freeze_charge with a target below the SoC discharges down to it #50 the executor ignores it, so the merge order doesn't matter;apps.yamlmapping, with this installation's sizes in a separate block (soc_max7.1,inverter_limit8000,battery_rate_max3600);README.MD:README.MD, Predbat thresholds: the old note said Predbat's thresholds were tuned for pence and should be cut to ~0.001 against zł prices. That's wrong: Predbat multipliesstart/end/valuerate lists by 100 (fetch_octopus_ratesinoctopus.py), so it works in grosze and its defaults fit. Production keeps them and only setsmetric_min_improvement_planto 5.Test plan
git clone, thenpip install -r requirements.txt. Fails on Python 3.9, works on 3.14.python main.py --dry-runwith the stock.env.example(only the port changed) starts, and/returns 200.MQTT_TOPICS.mdloads with PyYAML; theapps.yamlfragment was wrapped underpred_bat:for that.configuration.yaml,scripts.yamlandapps.yaml.🤖 Generated with Claude Code