Skip to content

v0.4.0b1 — presets, kept values, storage direction (beta)

Pre-release
Pre-release

Choose a tag to compare

@lightheaded lightheaded released this 22 Aug 13:04
· 4 commits to master since this release
d21dd59

A beta. Everything below is verified in unit tests and against Home Assistant's own entity and config-flow machinery, but not yet on a real charger. Please report what you see — especially over an ESPHome Bluetooth proxy.

Install it from HACS by ticking Show beta versions on the integration, then picking 0.4.0b1. To go back: pick 0.3.0 and restart.

Everything here comes from egiljae's report — thank you.

Fixed: "Config flow could not be loaded: 500 Internal Server Error"

The gear icon on the integration page did nothing but throw a 500, and the passcode prompt a refusing charger raises would have done the same. Both forms validated the passcode with a regex validator that Home Assistant cannot render, so the form never loaded. A wrong code now comes back as an error on the field.

Fixed: a storage run reading "Working"

Nothing in the protocol says whether a storage or cycle program is charging or discharging — the working-state byte reads the same either way, which is why both showed as working while the attributes correctly said storage.

The pack voltage says it instead: it rises on a charge and falls on a discharge. A 10 mV move across the pack settles the matter, measured against an anchor rather than the previous poll, so a storage discharge crawling a millivolt at a time still adds up instead of vanishing into the deadband, and a cycle turning round is caught within a poll or two. Expect a poll or two of working at the start of a run.

A storage run started from Home Assistant does not wait for that: its setpoint is known exactly, so the direction follows from the voltage the pack starts at.

Bonus: a channel whose program is unknown at all — a charger that never answers the basic-info query, or one with Read the program of a running channel turned off — now gets a direction too, where it used to be stuck on working.

New: what you type is kept

Staged values used to live in memory and revert to the charger's defaults whenever anything moved. Now:

  • a value entered for a program comes back when you return to that program
  • currents carry over to whichever program you switch to
  • everything is written to .storage, so a lost Bluetooth link, a reload or a restart no longer costs you the numbers

Voltage setpoints deliberately do not carry across a battery-type change — they belong to the chemistry, and folding a 4200 mV LiPo setpoint into the LiFe range would quietly land on that range's maximum.

New: presets

A whole staged program under a name — battery type, program, cell count, currents and voltages — saved on the charger and applied to any channel:

  1. Stage the program you want on a channel.
  2. Type a name in the new Preset name field.
  3. Press Channel X save preset.

From then on that channel's Preset select stages the lot in one pick. Editing any parameter afterwards leaves the select blank again — what is staged is no longer the preset. Saving over a name replaces it.

For automations: skyrc.save_preset and skyrc.delete_preset, both targeting a channel's preset select.

New entities: select.…_channel_X_preset, button.…_channel_X_save_preset, text.…_preset_name.

Upgrading

Your staged values reset once, to the charger's defaults, on the first start after upgrading — the per-entity state restore they used to rely on is gone in favour of storing the whole staged program at once, which is what makes them survive a charger that drops off Bluetooth. Nothing else changes; no entity is renamed or removed.