Detailed, technical changelog for developers. End-user-facing release notes live
in changelog.md as concise one-liners; this file keeps the full
rationale and implementation detail for each release.
MpvEnergySensor.native_value returns _last_value, which __init__ sets to
0 and only async_update copied from the integral (_state). Core's
IntegrationSensor.async_added_to_hass restores _state, but the first state
was written right after it, before the first poll: 0 for about ten seconds,
then the real counter (#61). A total counter going 0 -> 492 kWh is new
consumption for a utility meter. async_added_to_hass now sets _last_value
from the restored _state; without a stored state it stays 0. Covers the
daily and monthly counters too.
Documentation only. README installs through the Marketplace, which reads only
README.md at the installed or latest release, so info.md is removed.
Firmware a0023006 answers with Connection: close and refuses the next TCP
connect for a few milliseconds; setup.jsn, data.jsn and control.html
are sent back to back and always hit that window (#60). _retry_refused wraps
every request (mypv_dev.jsn in open(), _request, the auth.jsn login and
the HTTPS send) and retries a ClientConnectorError whose os_error is a
ConnectionRefusedError up to _REFUSED_RETRIES (5) times, _REFUSED_DELAY
(0.2 s) apart. Any other connect error fails at once.
The retry runs inside _request's try, so the mode-0 HTTPS fallback from
#54 only triggers once a refusal outlasts the retries; a brief refusal no
longer flips an HTTP device to HTTPS. A device that only speaks HTTPS pays
about one second once before the fallback.
_open_and_init returned (None, None) on a MyPVConnectionError without a
trace, so the log only showed "No myPV device responded". It now logs a warning
with describe_error(err).
Core 2026.11 added a device class option to the integral sensor
(home-assistant/core#174545) as a required keyword-only device_class
argument, so constructing MpvEnergySensor raised a TypeError and the whole
entry failed to set up (#58). integration_sensor_args now passes
device_class=None when the installed signature has the parameter
(_INTEGRATION_SENSOR_TAKES_DEVICE_CLASS), next to the existing hass switch
from 2026.8. None keeps the earlier behaviour: core derives the device class
from the source sensor, so a power source still yields energy. Passing
ENERGY outright would only skip that derivation, and passing it
unconditionally would break every core before 2026.11. The frozen-signature
test now covers 2026.7, 2026.8 and 2026.11.
MpvEnergySensor builds on core's IntegrationSensor, constructed with
unit_prefix="k" over a power source declared in watts. The unit is not taken
from that declaration, though: _derive_and_set_attributes_from_state reads
ATTR_UNIT_OF_MEASUREMENT off the source's state, and for a sensor with
device_class: power that attribute is whatever unit the user picked in the
entity settings -- SensorEntity.unit_of_measurement gives
_sensor_option_unit_of_measurement the highest priority. Switching the power
sensor to kW therefore fed "kW" into _calculate_unit, which appends the time
unit and prefixes the "k": "kkWh".
The reading was not wrong -- _update_integral divides by the same prefix, so
"kkWh" means exactly what it says -- but Home Assistant cannot convert that
unit, so the long-term statistics of a meter that had been recording kWh
stopped with "The unit has changed" (issue #55). It only ever showed up on an
installation where someone had changed that display unit, which is why it was
not reproducible here.
_calculate_unit is now overridden: for a source in W or kW it returns
UnitOfEnergy.KILO_WATT_HOUR and sets _unit_prefix to the divisor that
belongs to it (1000 or 1), so value and unit are corrected together rather than
the label being patched over a wrong number. Any other source unit falls
through to core's heuristic instead of being mislabelled. The divisor is set
inside _calculate_unit rather than in _derive_and_set_attributes_from_state
so that core's own device-class and icon handling -- both derived from the
returned unit -- keep working untouched.
volt_L2andvolt_L3were plain sensors on an AC-THOR 9s, whilevolt_mains(L1) was diagnostic (#56, by @vaterlangen). Both keys join_DIAGNOSTIC_DISABLED_KEYS, soMpvSensor.__init__gives themEntityCategory.DIAGNOSTICandentity_registry_enabled_default = Falselike the L1 voltage. Only a 9s is affected -- single-phase devices never report the two keys. On an existing installation the entities keep their registry entry and stay enabled, sinceentity_registry_enabled_defaultis read at first creation only; they merely move into the diagnostics section. A fresh setup gets them disabled.
The setpoint measured in v1.7.4 is now settable: MpvGridTargetControl in
number.py, wired through SETUP_TYPES["ptarget"] with its own grid_target
kind so it does not inherit MpvSetupControl's tenths scaling -- setup.jsn
carries ptarget in plain watts (ptarget -50 parked an AC ELWA 2 at ~77 W of
reported surplus, -500 at ~531 W). Written via set_number, and like the power
controls it only adopts the value once the device has taken the write.
The entity exists only where setup.jsn actually carries the key, which the
SETUP_TYPES loop already handles -- the Solthor fixture has no ptarget and
gets no entity, which the translation-coverage test walks.
Range is -1000..1000 W, step 10 -- the useful envelope rather than the
writable one, which setup.jsn does not expose. A target further from zero than
a kilowatt has no purpose: it only parks that much of the surplus unused (or
draws that much continuously), and the device's own regulation happens well
inside that band. ptarget2 is still unmapped.
set_number, set_power, set_control_mode, set_pid_power, switch,
activate_boost and firmware_command were ~120 lines of the same
try / except MyPVAuthenticationError -> _start_reauth / except _COMM_ERRORS -> warn / return True, copied seven times. They are now one-line callers of
_write(device, label, path, params).
The endpoint decides the rest, and that is not a simplification imposed on the
code -- it is what all seven were already doing. /setup.jsn writes get
send() (password-carrying POST) and a request_setup_refresh();
/control.html writes get command() and have their answer parsed into
state_dict for _check_http_control. Every previous method matched that split
except for one detail, which turned out to be dead code -- see below.
set_number and switch parsed the write's response into state_dict;
set_control_mode, activate_boost and firmware_command did not. Checked
against the hardware (AC ELWA 2, sec_level 2, firmware e0002500): a
POST /setup.jsn answers Content-Type: application/json with the entire
setup, 4773 bytes over 244 lines, and not one = in the body.
get_state_dict looks for key=value lines, so it extracted exactly zero
entries -- verified by running it over the captured response. Only
control.html returns that status block. The call is gone from the setup path.
Not purely cosmetic: the parser splits any line containing =, so a setting
whose value happens to carry one (an SSID, say) would have injected a junk key
into state_dict, which is what _check_http_control reads.
Found while checking the above, and the reason the dead call went unnoticed:
POST /setup.jsn is accepted and applied with a wrong password, and with no
pw field at all -- on a device in sec_level 2, the mode whose whole point is
that the config is password-protected.
Measured with every Home Assistant instance on the network shut down, so no
session of another client could have been carrying the write: tout was moved
60 -> 61 with no credentials, read back as 61, and restored to 60. All 243 setup
keys verified back at their original values afterwards.
Repeated three times -- right after the instances were disabled, later, and again after 25 minutes without a single login attempt from anyone -- because a time-limited session opened by another client's successful login would explain the first result just as well. It went through every time; no device holds a login open for half an hour of silence. The answer to an unauthenticated write is byte-identical to an authenticated one (HTTP 200, the whole setup as JSON), which is why "the device took it" and "the device ignored it" cannot be told apart from the response -- only a read-back distinguishes them.
/auth.jsn is the only endpoint that checks the password. It is what the web UI
logs in with, and it rejects a wrong one ({"auth":0,"wait":2}).
Do not take this as licence to stop sending the password on writes. It is one model on one firmware; other devices or later firmware may well enforce it, and a write that silently stops working would be far worse than a redundant field.
MpvSetupControl, MpvToutControl and MpvGridTargetControl differed only in
bounds, step, unit and whether the device stores tenths -- but each carried its
own _handle_coordinator_update and async_set_native_value, and they had
drifted: only the timeout survived a missing key, only the grid target checked
whether the write arrived before adopting the value. They are now one
MpvSetupControl driven by SETUP_NUMBERS, so both behaviours apply to all
four settings, and ptarget no longer needs a grid_target kind of its own.
_displayed() converts stored -> shown for the poll and the write alike, so a
written value cannot change shape ("50" -> "50.0") at the next poll -- the
wart MpvPowerControl documents.
tout keeps being created for every non-Solthor device whether or not the
device reports it (some only send it once written), so it is built directly
rather than through the SETUP_TYPES loop.
Adding grid_target made the if/elif desc.kind == ... chains in
MpyDevice.init_entities the sixteenth branch and took its McCabe complexity to
23, against a repo limit of 25. The kind is now looked up in two dicts mapping it
to (collection, class) -- one for data.jsn, one for setup.jsn -- so a key
that stands for exactly one entity is a table row rather than a branch. The three
that stand for several keep real code, moved into _add_binary_sensor (the
AC-THOR 9s relay split), _add_boost_buttons (the start/stop pair) and
_add_power_controls (both controls, the reading and its three energy meters).
The repeated "is there a usable value" test is _reports().
Complexity 23 -> 11. Two things fell out of the restructuring rather than being
aimed at: the allow-list tuples of kinds are gone (the table keys are the
allow-list, so a kind can no longer be listed as allowed while having no branch,
which "button"/"control" were in the setup loop), and data_keys is gone
with them (_reports() covers the absent case, so the list and its O(n) lookup
per key were redundant).
Verified as a refactor, not by the suite alone: the entity id, name, translation key and unique id of every entity were dumped for all three fixture models before and after, and the sets are identical.
Comes out of issue #54, where the reporter feeds his own grid measurement to
control.html?pid_power= from a REST command at 1 Hz rather than through the
integration. Asked why, he pointed at issue #25: he had tried the entity and it
"simply didn't work". Both reasons are in number.py and both are still there.
Measured, not deduced: writing control.html?pid_power=1234 makes the device
report a surplus of 1234. So the value is neither a setpoint nor the "upper
power bound" README.md and info.md claimed -- it is a measurement of the
power at the grid connection point that the device adopts as its surplus and
regulates on. Everything else lines up with that: the reporter in #54 sends a
signed value (-sensor.vz_power) and the device accepts both signs, the entity's
range is ±8388607 rather than 0..9000, and setup.jsn carries ptarget/
ptarget2 -- a target power at the grid, which presupposes a grid
measurement. Its purpose is a meter myPV does not support natively: Home
Assistant reads it and passes it on, and the control loop stays on the device.
Both docs corrected accordingly.
The single write that produced only ~1 W of output was the very start of the
rise. Measured afterwards on an AC ELWA 2 (sec_level 2, ptarget -50,
tout 60) with the --pid / --simulate modes added to dev_probe.py:
- Open loop, constant value: the output runs away. A constant 500 W surplus drove the output from 0 to the device maximum (3516 W against 3500 W nominal) and kept it there; 250 W reached the same maximum within 2 s. Nothing in the fed value bounds the output -- the error never disappears, so the controller integrates without limit. This is the trap for anyone who reads the control as a setpoint and parks a fixed number in it.
- Closed loop: it settles. Writing
available - outputevery 2 s, which is what a meter would report, parks the device at 723 W for 800 W of simulated surplus and at 265 W for 300 W, reached in about five write cycles. - The step response is derivative-dominated. A step to 300 W drove the output to 733 W for exactly one cycle and back to 265 W in the next, well below saturation, where a proportional term of that gain would have held the level for as long as the error stood.
- The residual is the setpoint, not an unintegrated error. With
ptarget-50 the loop parks at ~77 W of reported surplus, withptarget-500 at ~531 W, flat within ±2 W over three minutes. The device regulates the grid power toptargetand leaves that much of the surplus unused. The offset is not constant across operating points, though: at 300 W fed it was 35 W rather than 77 W.
Together this also answers the write-rate question that runs through #54: the
device reacts within one write interval and corrects a step in the cycle after
it is reported, so the write interval is the reaction time. README.md and
info.md now carry the user-facing half of this.
PID Power is still misleading as an entity name; a
rename changes the friendly name for everyone but the entity id only for new
installs, so old and new installations would diverge -- deliberately deferred.
KeyError: 'Control State'inMpvPidPowerControl.async_set_native_value-- the traceback from #25, verbatim.device.state_dictis filled byget_state_dict()from acontrol.htmlbody, so the key does not exist until that endpoint has been read successfully once. Now.get(), and a missing key is treated as unknown, not as not in HTTP control: only a key that is present and not"HTTP"is evidence of anything.- The unbounded retry loop is gone. The old code polled the control state and
looped
set_pid_power()+asyncio.sleep(1)until it read"HTTP", so a singlenumber.set_valuecould run for the lifetime of the entry. An automation writing at a fixed interval hits this in one of two ways: in modesingleevery subsequent run is skipped (the "didn't work" of #25), inqueued/parallelthe loops stack, each adding a request per second. The loop also could not reach its own goal -- the control type is asetup.jsnvalue (ctrl, exposed as the "Enable HTTP" switch), and no number ofcontrol.htmlwrites changes it. One request per call now.
_check_http_control()inMpvPowerControl, used by both controls. A device outside HTTP control answers acontrol.htmlwrite normally and discards the value; nothing distinguished that from a working write. The control page arrives in the write's own response andget_state_dict()parses it there, so the check costs no request._reported_no_httplimits it to one warning per mode change -- at 1 Hz, per-write logging would be its own defect. The plainpowercontrol never had theKeyErroror the loop, because it never looked at the control state at all, but it discards values just as silently, so it gets the same report.- The optimistic value is only adopted once the write succeeded.
set_power()/set_pid_power()returnFalseon a communication error and neither return was checked, so a failed write still left the requested value on the entity. Forpowerthe next poll corrected it fromdata.jsn; forpid_powernothing ever did -- the device echoes the PID input nowhere (thePower=line of the control page is the output power), so that entity is necessarily optimistic and a failed write would have shown a value the device never saw until the next successful one. async_write_ha_state()after a successful write.MpvEntityis aCoordinatorEntity, henceshould_pollisFalse, andhelpers/service.py:829only re-reads state for polling entities. Both controls assigned_attr_native_valuewithout publishing it, so a written value stayed invisible until the next coordinator update (up to 10 s).- The integer that was sent is the value shown. Both writes send
int(value)while the entity kept the float, so the state read2500.0after a write and2500after the next poll.
test_pid_power_set_value passed throughout, because the fake device serves
Control State=HTTP -- neither crash path was reachable from the suite. Added in
test_actions.py: a control page without a Control State line (exactly one
request, no exception), a device in Modbus control (one request rather than an
endless series, warning once and not on the second write), immediate publication
of the written value, and a failed write leaving the previous value in place.
device.pid_power/pid_power_setare read nowhere outsideMpvPidPowerControl, and the counter only delays the reset-to-zero by two cycles. Cleanup, not a fix; left for its own commit.MpvSetupControl/MpvToutControlshare the optimistic-value question, but they writesetup.jsnand triggerrequest_setup_refresh(), so the next poll corrects them within ~10 s.- A failed write still does not raise.
HomeAssistantErrorwould make it visible to automations, but on the reporter's device -- refused connections at 1 Hz -- it would turn a silently-continuing automation into a failing one, andtest_number_set_value_handles_command_errorpins the current contract. That is a deliberate behaviour change, not a bug fix.
Follow-up on issue #54: 1.7.2 made the cause visible, and it was not the one
its three changes addressed. The reporter's new log read
MyPVConnectionError <- ClientConnectorError: Cannot connect to host 192.168.21.75:80 <- ConnectionRefusedError.
- Refused, not timed out, and on port 80. The integration only sends
data.jsnandcontrol.htmlover plain HTTP (_HTTP_IN_SEC0), and only whensec_level == 0. Our own field data (see the v1.6.6 section) records the converse: a refusal on port 80 is the signature of encryption mode 1/2. So the device behaves like mode 1/2 while we believe it is in mode 0. - It is the HTTPS connection. A
MyPVConnectionErrorwith a chained cause can only come from theexcept ... raise ... from excpath, i.e. an open session whose request failed. An HTTP-only entry would already have failed inopen(), which returnsFalseand produced a cause-less error. That also explains the persistence the reporter saw: withsec_level 0on an HTTPS connection the port-80 request fails on every poll, forever. - It does retry.
DataUpdateCoordinatorlogs a failure only whilelast_update_successis still true (update_coordinator.py:438), and thecontrol.htmlbackoff drops to debug after three tries -- hence three lines and then silence, which read as "it gave up".
- The HTTP downgrade is no longer trusted blindly. A
ClientConnectorErroron a downgraded path sets_http_refused, and the request is retried over the connection's own protocol;_downgrades_to_http()then skips the downgrade for the rest of the connection's life. The HTTPS server runs in every mode, so the fallback is safe, and it heals without a reload. Not reset on recovery: HTTPS works in mode 0 too, so there is nothing to gain by downgrading again. MyPVConnectionErrornow carries the URL and the reported mode (_connection_error()), replacing every bareraise. The mismatch that took a round trip with the reporter to establish is now in the first log line:http://…:80 … (sec_level 0).describe_error()can no longer raise.ClientConnectorError.__str__dereferencesself._conn_key, which is not always populated -- found by the new tests, where a synthetic instance made the formatter throw. Since it runs insideexcepthandlers, that would have turned a handled connection error into a crash: a defect introduced by 1.7.2 itself.
Whether sec_level really reads 0 on the reporter's device decides the root
fix: if it does, the downgrade rule is wrong and _HTTP_IN_SEC0 should go
entirely; if it does not, our stored value went stale and that is where the bug
lives. The "Encryption" diagnostic sensor shows the value directly. The fallback
is correct either way, which is why it shipped without waiting for the answer.
Prompted by issue #54 ("All entities reported as unavailable"), whose two log excerpts both ended at the colon with nothing after it.
MyPVConnectionErroris raised bare, so%slogged nothing -- the reported symptom, and the reason the report could not identify its own cause.TimeoutError,ClientConnectionError,ClientOSErrorandClientPayloadErrorall stringify to""as well, so even passing the original through would have logged an empty line for the common cases. Newdescribe_error()inconnection.pynames the type and walks__cause__(cycle-guarded), and every_COMM_ERRORSlog site incommunicate.pynow routes through it. The transport already chained the real error viaraise MyPVConnectionError from exc; only the formatting discarded it.
- A single failed poll no longer blanks every entity.
MpvEntityis a plainCoordinatorEntity, solast_update_success = Falsemade all of them unavailable at once -- the sawtooth in the reporter's graph._async_update_datanow tolerates_POLL_FAILURES_TOLERATED(3, ~30 s) consecutive failures, keeping the last values, and only then raisesUpdateFailed. Guarded by_had_poll_successso a device that never answers still fails setup instead of appearing to work. setup.jsnis no longer read every cycle. Per poll and device the integration issued three sequential requests (data.jsn,setup.jsn,control.html) against a web server that serves one connection at a time, with a 5 s request timeout at a 10 s interval.setup.jsnbacks eight entities, all of them settings (devmode,bstmode,ww1target,ww1boost,ctrltwice,tout,sec_level) -- no measurement, so throttling it costs no resolution. Now read every_SETUP_REFRESH_CYCLES(12, ~2 min) viaMpyDevice.setup_skip, cutting the request load by a third.request_setup_refresh()resets the counter after every write that touches/setup.jsn(set_number,set_control_mode,switch,activate_boost), so a user's own change is still confirmed on the next poll.- A failed poll also resets it:
sec_levelselects HTTP vs HTTPS per endpoint at runtime, and it is visible only insetup.jsn. An encryption-mode change at the device would otherwise keep every other endpoint failing against the wrong protocol until the throttle elapsed.
describe_errorover the silent error types, the cause chain and a self-referential cause.- The tolerance both ways: a short dropout keeps
last_update_successtrue and the budget resets on recovery; a lasting one still fails. - The
setup.jsncadence asserted as a property (at most one read per window while every poll readsdata.jsn), not as an exact count -- the counter is already part-elapsed when a test starts.
- The capability half of
supports_remote_install()locked out the AC.THOR (issue #52, fix contributed by @marmer1 in #53). The check requiredupd_percentage, which I had generalised from exactly two AC ELWA 2 captures (e0002410without it,e0002500with). An AC.THOR ona0022401reports no percentage at all and counts remaining files instead (upd_files_left), so the update entity offeredPROGRESSonly and the install stayed unavailable -- even thougha0020000, the minimum for that series, is the one value taken from my-PV's own library config rather than inferred. The version gate was right; the extra safeguard built for the guessed e-series threshold was what blocked the family with the documented one. - The second key is now named
_FILES_LEFT_KEYalongside_PROGRESS_KEY, with the family difference recorded next to it.
test_remote_install_needs_a_progress_indicatoris parametrized over both families and both bare cases; verified to fail for the AC.THOR case with the fix reverted.
Promotion of v1.7.0b2, code unchanged. The two beta sections below stay as the record of how the version gate got fixed.
- The version gate: the reporter's AC ELWA 2 (
e0002500) is offered the install, and Home Assistant moved the entity from Diagnostic to Config, which isUpdateEntity.entity_categoryreacting toUpdateEntityFeature.INSTALL— so core does see the feature.
- The install sequence itself. The device reports
fwversion == fwversionlatestandupd_state == 0, so there was no pending update to run it against; it has only been exercised against the fakes. The failure mode is bounded:firmware_downloadmerely downloads,upd_state == 10is a stable state from which the installation can still be started from the device's own web interface, and a device that ignores the keys runs into the 5 minute timeout and reports a translated error. - Whether the device would even find an update is open: nothing in the integration triggers the library's
check_fwupdcommand, andhomeassistant.update_entityonly reachesCoordinatorEntity.async_update(), i.e. a plaindata.jsnre-read. When the device checks with my-PV is entirely up to the device.
- The b1 version gate excluded every AC ELWA 2 — i.e. the device the feature was written for. It required the
aseries (>=a0020000), taken from the my-PV library's shared base config. But the version series identifies the device family, not a common numbering:ais the AC•THOR,ethe AC ELWA 2,sthe Solthor, and the library's own ELWA config gatessetup.mainmodeon>=e0001000. Since upstream never evaluates any of these strings, the mismatch cannot surface there. Confirmed against hardware: the reporter's AC ELWA 2 runse0002500, so b1 would never have offered the install button. - Fix: a minimum per series plus a capability check.
_INSTALL_MIN_FW = {"a": 20000, "e": 2500}; a series without an entry (Solthor) stays report-only. Because a version number cannot be compared across series,supports_remote_install()additionally requires the device to reportupd_percentage— the two ELWA captures bracket this nicely: the oldere0002410infake_elwa.pydoes not report the key at all, thee0002500capture does.supports_remote_install()therefore takes the whole data dict now, not just the version string.
- Co-controller firmware entity. The devices report a third firmware part next to the control and power unit:
coversion/coversionlatest/co_upd_state(ec104on the captured ELWA). The my-PV library knowscoversionas "Co-controller version" but neither the latest-version nor the update-state key. Report-only, like the power unit parts.
- The AC ELWA 2 fixture used
fwversion: "a0001234"andpsversion: "d0005678"— an AC•THOR-shaped version on an ELWA, which is precisely what hid the bug above. It now mirrors the real capture (e0002500/ep109/ec104plusupd_percentage,ps_upd_state,co_upd_state), so the translation-coverage test also exercises the new entity. test_remote_install_gate_by_seriescovers both series' minimums and the unknown-series case;test_remote_install_needs_the_progress_keycovers the capability half.
- Firmware installation from Home Assistant.
MpvFwUpdategainedUpdateEntityFeature.INSTALL, driving the sequence the my-PV reference library implements inMyPVDevice.update_firmware()(added there in py-mypv 0.0.6, 2026-07-20): atupd_state == 1sendfirmware_download, wait forupd_state == 10, sendfirmware_update, wait forupd_state == 0. Both commands are ordinarysetup.jsnwrites ({"firmware_download": 1}/{"firmware_update": 1}), added asMypvCommunicator.firmware_command()alongsideactivate_boost(). Each step has a 5 minute timeout and polls every 5 s throughcoordinator.async_refresh(), whose failures are swallowed — the device reboots while installing, so failing polls are expected. Errors are translated (exceptionsblock instrings.json, new for this integration). - This corrects the assumption the entity was built on. The old comment claimed "the device downloads and installs new firmware on its own";
upd_state == 10is literally "Download finished, waiting for installation", so without the command the device sits there. - Version gate. The library's device configs declare
"firmware": ">=a0020000"on both commands — and never evaluate it (supports_command()only checks theadvancedflag, so upstream offers the commands on any device). We do evaluate it:supports_remote_install()requires theaseries and seven digits>= 0020000, so a Solthor (s…) and any pre-a0020000 device keeps the old report-only behaviour. Only the control unit is installable — whetherfirmware_downloadalso drives the power unit parts (ps_upd_state,p9s_upd_state) is unverified, so those stay report-only. - The other firmware gate in the library's configs, for reference:
setup.mainmodeon the AC ELWA 2 needs>=e0001000.
in_progresswas computed but never shown.UpdateEntity.state_attributesis@finaland only reads thein_progressproperty whenUpdateEntityFeature.PROGRESSis set; otherwise it uses its own private flag, which moves only while HA itself installs. The entity had no features at all, so a download running on the device stayed invisible.PROGRESSis now a class-level default on every part,INSTALLis added on top where supported.update_percentagereportsupd_percentageduring the download states (2/3/4) — HA blanks it outsidein_progressanyway.
- Our
upd_stateenum is more complete than the library's: we know0,1,2,3,4,5,10plus the Solthor offset, upstream only0,1,3,10. Its download wait keys on10with theupd_percentage == 100check commented out, so an interrupted download (5) runs into its timeout. - Released as a beta: the install path writes to live heating hardware and has only been exercised against fakes.
sensor.<ac_thor_9s>_output_statuslost its state class on devices that reportrel1_outas a string (issue #50, "Die Entität hat keine Zustandsklasse mehr").MpvSensor.__init__decides the state class by sniffing the raw first reading (device.data.get(key)), butMpvOutStatSensorpublishes something else — the last digit of the zero-padded relay word, always anint. Reproduced with the 9s fixture:rel1_out=101→ state'1',state_class=measurement;rel1_out="0101"→ same state'1',state_class=None. Theisinstance(value, str)branch in_handle_coordinator_updatehas been there since v0.9.4 ("Fix for AC-THOR 9s detection and binary values"), so string-reporting 9s are real. History: up to v1.3.2 everyMpvSensorhad a hardcodedMEASUREMENT;e6c52b6(v1.3.3) switched to "no unit → no state class", which took it away;03e8c9d(v1.4.5) gave it back for numeric readings — but only when the raw value is numeric. So this entity has been without a state class since v1.3.3 on those devices, and anyone updating from ≤1.3.2 now gets the statistics repair.- Fix:
MpvOutStatSensorpins_attr_state_class = MEASUREMENTand opts out of the reading-based check via the new_state_class_from_reading = False. The class attribute alone is not enough — the base__init__assigns the instance attribute and would still override it.MEASUREMENTover a properENUMon purpose: an enum would change the states from a number to text and break the users' history and automations, while the value is numeric and did carry statistics before. - The Surplus sensor's state class depended on startup timing.
"surplus"isMpvDescription("Surplus", None, "sensor_always")— numeric, unitless, and deliberately created before its first value arrives. The sniff then sawNone, concluded "not numeric" and dropped the state class; when the device did report the key at startup, it kept it. That flips between restarts and raises the same repair repeatedly. Now only a reading that is actually present may take the state class away. Safe, becausesensor_alwaysis the only kind built without a sample (all others requirekey in data), and its single member is numeric. number.<device>_control_value_timeoutwas never created on devices without atoutsetting (found while reproducing the above:Error adding entity number.… KeyError: 'tout').MpvToutControlis appended for every non-Solthor device (mypv_device.py:235), but_handle_coordinator_updatereadself.device.setup["tout"]unguarded, so the first update raised while the entity was being added and it disappeared entirely. It now skips the update and stays unknown, mirroringMpvSensor.
test_outstat_keeps_measurement_for_any_raw_typeis parametrized over both raw types,test_sensor_without_reading_keeps_measurementcovers the Surplus case, andtest_9s_entities_without_a_control_value_timeoutsets up a 9s whosesetup.jsnhas notoutand asserts the number entity exists and is unknown. All three verified to fail with the fixes stashed.
- What the last digit of
rel1_outactually encodes is still unconfirmed (digits 0-2 are the Relais / Out 3 / Out 2 binary sensors). If it turns out to be a small enum rather than a level, anENUMsensor would be the honest model — but only worth it alongside a migration that does not silently break existing statistics and automations.
- Setup failed on HA Core 2026.8 with
TypeError: IntegrationSensor.__init__() takes 1 positional argument but 2 positional arguments (and 8 keyword-only arguments) were given(issue #51, reported against 2026.8.0b2).MpvEnergySensor.__init__passeddevice.comm.hasspositionally, which every core up to 2026.7 required. Core PR #177596 ("Do not set a device on YAML integration entities", merged 2026-07-30, milestone 2026.8.0, commitafad195652f) removed the parameter: since #177459entity_platformwarns when an entity attaches a device without a config entry, and the constructor unconditionally didself.device_entry = async_entity_id_to_device(hass, source_entity)— also for YAML setups, where that link was never persisted anyway. The lookup therefore moved out to the caller as a new optional keyworddevice: DeviceEntry | None = None, leavinghassunused and dropped. Signature verified against the release tags: 2026.7.4 and 2026.8.0b0 still takehass, 2026.8.0b1 and later do not. The whole integration was dead on 2026.8 —init_entities()raises before any platform is set up. - Fix: derive the call shape from the installed signature. The issue reporter's patch (just delete the argument) is correct on 2026.8 but breaks every core from 2026.4 (our
hacs.jsonminimum) through 2026.7, wherehassis mandatory._INTEGRATION_SENSOR_TAKES_HASSinspectsinspect.signature(IntegrationSensor.__init__).parametersonce at import, and the newintegration_sensor_args()helper addshassonly when the installed core still declares it. Inspection rather than a version comparison, so betas and any backport are handled correctly too. deviceis deliberately not passed on 2026.8+. On the old core the dropped lookup resolved the source entity's device, i.e. the same myPV device the energy sensor already gets fromMpvEntity's_attr_device_info(MpvSensor.__init__runs right after, andEntityPlatformsetsdevice_entryfrom the device info when adding). Passing it would be redundant; the device assignment is unchanged in practice.
test_integration_sensor_args_match_coreis parametrized over frozen copies of both real signatures (2026.7 and 2026.8) and binds the produced arguments against each withinspect.Signature.bind— the exactTypeErrorfrom the issue is what it catches.test_integration_sensor_args_bind_to_installed_coredoes the same against theIntegrationSensoractually installed, so the next signature change surfaces here rather than in a user's log.- This needed
integration_sensor_args()to be a module-level helper: the arguments are otherwise built inline inside__init__and are not reachable without constructing a full entity.
- Energy sensors integrated a source entity that does not exist on a translated installation.
MpvEnergySensor.__init__built theIntegrationSensorsource id asf"sensor.{slugify(name_by_user + '_' + source.name)}"— i.e. from the English description name (Power ELWA-2). The display name is resolved throughtranslation_key, so on a German installation the power sensor is registered assensor.<device>_leistung_elwa_2while the energy sensors kept integratingsensor.<device>_power_elwa_2. Nothing ever reported under that id, soint_/intd_/intm_sensors stayed at0and — becauseIntegrationSensorderives its unit from the source — carried nounit_of_measurementeither. Reported for an AC ELWA 2 on a German install; every non-English user is affected, and so is anyone who renamed their power sensor (the same string-built id breaks on rename). - Fix: resolve the source through the entity registry by unique id. The unique id (
f"{serial}_{source.name}") is derived from the raw English name and is both language- and rename-proof.async_added_to_hasslooks the real entity id up and rebinds_sensor_source_id(state tracking) and_source_entity(initial value + restore) before delegating toIntegrationSensor; by then the power sensor is registered, as it is added ahead of the energy sensors on the same platform. The construction-time string id remains only as a placeholder, and a failed lookup now logs a warning instead of integrating silently into nothing. Thename_by_userdevice-registry walk this needed is gone. - Note this was collateral damage of the v1.4.2 translation fix (
del self._attr_name, so the translated name is used): that is what made the entity id language-dependent, invalidating the assumption the source id was built on.
test_energy_sensors_bind_to_the_translated_power_sensorsetshass.config.language = "de", resolves the power entity from the registry, asserts its id really is the German one, and then asserts the publicsourceattribute of all three energy sensors points at it. Verified to fail against the old string-built id, so it is a genuine regression guard — in English the old code would have passed.
button.stop_boostdoes not stop a running boost (reported alongside the above; present in 1.6.3 too, so not a regression).activate_boost(device, 0)writesPOST /setup.jsn {"bststrt": 0}, and the device evidently ignores it:bststrtlooks like a one-shot trigger rather than a flag, andsetup.jsncarries no boost-stop key (onlybstmodeandww1boost). The reporter stops a boost by switchingbstmodeoff. Needs asetup.jsndump taken while a boost runs and again after stopping it from the device's own web interface, to see which key actually changes — guessing a write to live heating hardware is not acceptable.
Structural follow-up to v1.6.5, which only removed the trigger. control_enabled conflated two unrelated questions — "can the device do this?" (capability) and "is the read working right now?" (runtime health) — and answered both with one latch that could only ever go from True to False. Both halves are now separated.
- Entity existence no longer depends on the control read. The
control_enabledgate is gone frominit_entities()(boost buttons and the powernumberentities). It was always redundant for capability: those entities are already gated onkey in data_keys, andboostactiveis adata.jsnkey, so a device without boost support simply does not offer it. The gate contributed nothing except the failure mode reported against 1.6.4 — a read failing at setup silently stripping working entities. - The control read backs off instead of giving up.
control_enabledis replaced bycontrol_failures/control_skip. The first_CONTROL_FAILURES_BEFORE_BACKOFF(3) consecutive failures are retried at the full poll rate and logged as warnings; after that the read is retried only every_CONTROL_RETRY_CYCLES(30) polls — ~5 min at the 10 sSCAN_INTERVAL— and logged at debug, so a device that genuinely does not serve the endpoint is not hammered. A single success resets the counter. - This fixes a second, older bug unrelated to 1.6.4.
control_enablednever returned toTrue, andMpyDevice.update()gated the whole state read on it. One transient timeout — near-certain over days against a device that serves a single connection at a time, polled every 10 s — permanently froze the control state on its last value until the entry was reloaded. That has been latent since long before the 1.6.4 regression.
http://<ip>/control.html→ connection refused (the device serves no plain HTTP, sosec_levelis 1 or 2 and the integration correctly routescontrol.htmlover HTTPS);https://<ip>/control.html→ 404.- v1.6.5 did not help; a downgrade to 1.6.3 restored the entities. So the 404 carries no usable body — empty or a bare error page — and
if text.strip()never fires. The v1.6.5 remedy was aimed at a sloppy status with a good body; the reality is a genuine 404. The mechanism (thecontrol_enabledgate) was right, the assumed payload was not. - Why 1.6.3 worked is now fully explained: it returned the empty body unconditionally,
get_state_dict("")produced an empty dict without raising,state_update()returnedTrue, the gate stayed open and the entities were built. - The device evidently 404s the parameter-less read specifically (that is what was tested in a browser). Whether it accepts
control.htmlwith query args is unknown, so the powernumberentities may or may not steer on this firmware — unchanged from 1.6.3 either way. - The boost buttons are unaffected by all of this:
activate_boost()writesPOST /setup.jsn {"bststrt": …}and never touchescontrol.html. They were gated on an endpoint they do not use, which is the clearest argument that the gate was simply wrong.
test_boost_buttons_exist_when_the_control_read_failsis an end-to-end regression guard: it sets up an entry whosecontrol.htmlalways raises and asserts the boost buttons are in the entity registry. Verified to fail with the old gate reinstated, so it is not a vacuous test. Required a new per-pathDeviceSpec.text_errorsin the fake world (the existingerrorfield fails every read, which would have failed setup outright rather than modelling this case).test_state_update_failure_backs_off_then_recoversreplacestest_state_update_failure_disables_control, covering the counter, the backoff and the recovery.
- Boost buttons and power controls vanished after 1.6.4 (regression). v1.6.4 turned every non-200 read into a
MyPVConnectionError. On thecontrol.htmlstatus read that is fatal in a way that is invisible in the logs:MpyDevice.initialize()callsstate_update()beforeinit_entities(),state_update()catchesMyPVConnectionErrorand latchescontrol_enabled = False(communicate.py), andinit_entities()gates the boost buttons and the powernumberentities on that flag (mypv_device.py). Everything fed fromsetup.jsn— including thebstmode"Enable Boost Mode" switch, which lives inSETUP_TYPESand is built in a separate, ungated loop — survives. Reported symptom (three AC-THORs, unchanged config, 1.6.3 fine / 1.6.4 broken): switch present,button.start_boost/button.stop_boostgone. That split falls exactly along thecontrol_enabledgate, not along "boost-related", which is what identified the mechanism. _requestnow accepts a response that is a200or carries a non-empty body. Embedded myPV firmware answers some endpoints with a sloppy status while the payload is perfectly good — the suspected trigger is the parameter-lesscontrol.htmlread (state_updateis the only caller without query args; commands always pass some). The status is a channel independent of the body, and up to 1.6.3 the transport ignored it entirely, which is why this never surfaced before. Precedence on a non-200 is now: cached body (keeps the v1.6.4 transient-429protection) → non-empty body (v1.6.3 behaviour) →MyPVConnectionError. Only200bodies are cached, so an error page can never poison the cache and later be served as device state.- Note the parser is deliberately unbreakable here:
get_state_dictonly pickskey=valueout of lines not starting with<, so even a useless body yields an empty dict rather than an exception — under 1.6.3 that still leftcontrol_enabledTrueand the buttons in place. The boost command itself is a different request (control.htmlwith query args), so it may well have been working all along even where the status read was not.
- The exact HTTP status the reporter's AC-THOR returns is still unknown (no log yet);
400/404on the parameter-less read are the working hypotheses. Redirects are ruled out (aiohttp follows them), as is a malformed status line (that raisesClientError, which already failed identically in 1.6.3). If 1.6.5 does not fix it, the next datum needed is the rawcurl -sk -D - http://<IP>/control.htmloutput. - The deeper design issue is untouched by choice: entity existence is still decided by a single read at setup time, so any future transport hiccup can strip the control entities again. Decoupling capability from runtime health (or retrying before latching
control_enabled) remains the structural fix. Done in v1.6.6. Deliberately held back from 1.6.5 so that release stayed a single-variable experiment: with the decoupling shipped too, the buttons would reappear for the reporter either way and we would never learn what the device actually answers oncontrol.html.
Runtime robustness, informed by reading the my-pv==0.0.2 reference library (which the integration no longer depends on but which models the device's session behaviour). The library authenticates once in open() and then reuses the aiohttp ClientSession — i.e. relies on the session cookie the device sets at login — for every subsequent read/write; it never re-authenticates per request, and on any unexpected HTTP status (including 429) it returns {} rather than crashing.
- Transient non-200 no longer crashes the poll.
_requestnow raisesMyPVAuthenticationErroron401and, for any other non-200 (e.g. a429rate limit), returns the last cached body for that read path (self._cache, keyed by path, populated on each 200 read with no query). Previously the non-JSON body was passed tojson.loads→JSONDecodeError→UpdateFailed→ all entities unavailable with no reauth prompt. With no cached value yet it is a transientMyPVConnectionError. - Removed per-request re-authentication. The
_reauthenticate/_get_once/_post_onceretry-on-401 added in v1.6.3 is gone; the connection logs in once (open()) and reuses the session like the library. This cutsauth.jsntraffic (the device rate-limits / locks out on frequent logins) and simplifies the read/write paths back to a single request.
Note: the exact production trigger (a device 429 under sustained polling) was inferred from the library diff, not reproduced live; the fix is a robustness improvement regardless and mirrors the library's own handling.
Two-phase transport model, verified on real e0002410. The earlier attempts to derive the transport during detection kept tripping over the device's grace window (after a login, setup.jsn reads stay open for a while, so a password-less probe is unreliable) and over a sec_level 0 + password device that serves data.jsn/control.html over HTTP but protects setup.jsn over HTTPS. The clean split:
- Phase 1 — detection (
config_flow._check_host, simple). A working HTTPS connection means new firmware, which always has a login password (it can only be changed, not removed): the integration's initial login opens the device's grace window so reads/writes work afterwards. So new firmware always routes to the password step; plain HTTP means old firmware (no password).sec_levelis not read here — it needs the (grace-dependent, pre-login)setup.jsn, so it is deferred to runtime. - Phase 2 — runtime (respects
sec_level). After the login,setup_update()readssetup.jsn(over the connection's own protocol -> HTTPS on new firmware) and callsconnection.set_sec_level(). The connection then routes per endpoint via_scheme_for():sec_level 0servesdata.jsn/control.htmlover plain HTTP, everything else (andsetup.jsn+auth.jsn) over HTTPS;sec_level 1/2use HTTPS throughout.setup.jsnis the deliberate exception (_HTTP_IN_SEC0excludes it) because the firmware protects it over HTTPS even in HTTP mode. sec_level 1vs2. A401on a read or asetup.jsnwrite triggers a single_reauthenticate()(re-runauth.jsn) and retry before surfacing as an auth error — covers a shorter grace window in mode 2; a no-op under the endless grace of modes 0/1.- Self-heal (
_setup_host) simplified to match. An old plain-HTTP entry (no password) whose device is now new firmware can no longer read it; if the device speaks HTTPS and no password is stored, it routes to reauth. The formersec_level-probing / no-password-HTTPS-upgrade /_persist_https()paths are gone._open_and_init()now also maps aMyPVAuthenticationErrorraised duringdevice.initialize()(a read401that re-auth could not satisfy) toConfigEntryAuthFailed. CONF_SSLis no longer written by the config flow (a stored password implies HTTPS; the runtime transport followssec_level); it is still read for backwards compatibility with pre-1.6.3 entries.
- A reachable-but-unreadable device routes to the password step instead of failing at setup.
mypv_dev.jsn(the discovery/identity beacon) answers over plain HTTP in every state, including a device still locked in its initial state after a firmware update — butsetup.jsn/data.jsnare gated behind a login there, sosec_levelcannot be read over any password-less channel._check_hostpreviously fell through toauth_required=Falsein that case (no password prompt → the config entry was created HTTP-only → setup then raisedConfigEntryNotReady"No myPV device responded"). It now returnsauth_required=Truewhenever the device is reachable butsetupcame backNonefrom both the HTTP and the password-less HTTPS probe, so the user gets the password step. Thepasswordstep description also tells the user to set the initial password on the device's own web interface (initial password = device key) first.sec_level 0with open HTTP reads is unaffected:setup.jsnreads there,sec_levelis0, and no auth flow is triggered.
- Self-healing transport on a post-setup encryption-mode change. An already-configured entry stores its transport (
CONF_SSL/CONF_PASSWORD); if the device'ssec_levelis later changed, the stored transport can no longer read (mypv_dev.jsnstill answers over plain HTTP in every mode, soopen()succeeds, but the first real read ofsetup.jsnis redirected →MyPVConnectionError→ an endlessConfigEntryNotReadyretry).MypvCommunicator.initialize()now heals this:_setup_host()opens + initialises via_open_and_init(), and on failure re-readssec_levelover password-less HTTPS (_probe_sec_level(), open in every mode) —2without a stored password raisesConfigEntryAuthFailed(reauth for the password);1/2while on plain HTTP upgrades to HTTPS and persistsCONF_SSL(_persist_https()). It also covers the inverse: reads that succeed over HTTP while the device reportssec_level ≥ 1are upgraded to HTTPS too (otherwisecontrol.htmlwould be redirected). Connections exposeis_httpsfor the HTTP-vs-HTTPS decision. A wrong stored password still raisesConfigEntryAuthFailedfromopen()directly.
- Removed the
my-pvlibrary dependency — the transport is now built in.connection.pyis self-contained (own aiohttpClientSessionlifecycle, ownMyPVConnectionError/MyPVAuthenticationError;manifest.jsonrequirements: []). The library was0.0.2and did not match the real firmware (wrong auth encoding, POST-vs-GET writes, no HTTPS-without-password); we had already overridden almost everything, and its HTTP_auth(GET http://…/auth.jsnwithssl=True) actively broke detection on new firmware —/auth.jsnis HTTPS-redirected there, so the self-signed cert raisedMyPVAuthenticationErrorin every mode. Base_Connectiongivesopen()(session +mypv_dev.jsn),is_open(),close(),get_json()/get_text()(raw, key-preserving),send(),command();MypvHttpConnection(http) andMypvHttpsConnection(https,ssl=False, optional password) specialise it. - All three firmware encryption modes supported and auto-detected.
sec_levelgoverns only thecontrol.htmlchannel; data/setup stay open and the HTTPS server runs in every mode. Contract (verified on reale0002410): reads andcontrol.htmlpower steering are open (no password) everywhere; config writes arePOST /setup.jsn(withpwonly in mode 2); the browser-encoded password (_encode_form) gates only/auth.jsn.create_connection(host, password, use_https)picks HTTPS when a password is set oruse_https, else HTTP;communicatereadsCONF_SSLand passesuse_https.- Detection (
_check_host): the encryption mode is read straight fromsetup.jsn'ssec_level(0HTTP /1HTTPS /2HTTPS + password).mypv_dev.jsnis served over plain HTTP in every mode (it is the discovery/identity endpoint), so it only proves reachability and gives the name — it does not distinguish the mode (an earlier redirect-probe wrongly assumedmypv_dev.jsnis redirected in mode 2; onlydata.jsn/setup.jsn/control.htmlare).setup.jsnis readable over plain HTTP in modes 0/1 (and old firmware) and over HTTPS without a password in every mode, so detection tries HTTP then HTTPS and classifies bysec_level:2→ password step (CONF_PASSWORD, which already implies HTTPS);1→CONF_SSL: True(HTTPS, no password);0or absent (old firmware) → plain HTTP.
- Detection (
- Two write channels.
send()= config writes (POST /setup.jsn,pwappended only when set);command()= power steering (GET /control.html?…, never carriespw— the channel is open, so the password stays out of URLs). - New "Encryption" enum sensor (
MpvEncSensor, diagnostic) reflectingsetup.sec_level→ HTTP / HTTPS / HTTPS+PW. - Reauth unchanged in spirit: a wrong stored password →
open()raisesMyPVAuthenticationError→ConfigEntryAuthFailedon setup/poll, or_start_reauth()on a user command.
- The device contract (all three modes: reads, config writes, boost,
control.htmlpower steering, login encoding) was confirmed live. The rebuilt self-contained transport +sec_levelauto-detection were re-verified live against the real device in all three modes: mode 0 (HTTP), mode 1 (HTTPS, no password — reads/control.html/config write over HTTPS), and mode 2 (HTTPS + password — detection routes to the password step, login/reads/control.html/config write over the authenticated HTTPS session). The mode-2 detection fix (readsec_levelrather than assumemypv_dev.jsnis redirected) was validated on hardware.
- Transport moved onto the official
my-pvlibrary (requirements: ["my-pv==0.0.2"]). A newconnection.pysubclasses the library'sMyPVHTTPConnection/MyPVHTTPSConnection(MypvHttpConnection/MypvHttpsConnection) and adds the raw access the integration needs:get_json()returnsdata.jsn/setup.jsnunmodified (the library lowercases keys, which would breakvolt_L2etc.), andget_text()provides plain-text access for thecontrol.htmlpower steering the library does not expose. Requests are serialised per device via a per-connectionasyncio.Lock(replacing the former single global lock).MypvCommunicatorkeeps the exact same public method surface (data_update,setup_update,state_update,set_number,set_power,set_pid_power,set_control_mode,switch,activate_boost,get_state_dict), somypv_device.py,const.pyand every entity platform are unchanged. Device values stay raw — the library's value/config layer (MyPVDevice+ bundledconfigs) is deliberately bypassed, so entity scaling (°C/10, Hz/1000, A/10) and unique ids are identical. - Authentication. The config flow probes the device through the library; if it redirects to HTTPS (
MyPVAuthenticationError), apasswordstep is shown and the password is stored inentry.data[CONF_PASSWORD]. Old HTTP-only firmware is detected as before and needs no password. Areauth/reauth_confirmflow updates the password if it later becomes invalid; at runtime an auth failure during the cyclic poll raisesConfigEntryAuthFailed, and an auth failure during a user command starts reauth directly (MypvCommunicator._start_reauth). Each device gets its own library connection (its own session/auth), and connections are closed on unload (MypvCommunicator.async_close). - Transport hardening.
connection._requestreads the body inside anasync withblock so the response is always released — including on the 401 (auth) path, which previously leaked the connection until GC. - Tests reseamed onto the connection layer. The suite no longer mocks aiohttp;
create_connectionis patched to aFakeWorld/FakeConnection(oneDeviceSpecper IP), so unreachable / auth-protected / dropping devices are modelled directly. Newtest_connection.pyexercises the realMypvHttpConnectionagainst a mocked session (query encoding, JSON parsing, 401→auth + response release, connection-error mapping, per-device serialisation,create_connectionfactory), plus new password/reauth/command-auth coverage.config_flownow routes throughcreate_connection(single seam) and the deadcheck_ipwas removed. Run with the Python 3.14 dev-container.
- HTTPS/auth path ships as experimental. Basic interaction with an auth-firmware device (
e0002410) has been confirmed on real hardware with no HA log errors; broader confirmation is still pending — in particularcontrol.html?power=…power steering over the authenticated HTTPS session. The plain-HTTP path on old firmware is byte-for-byte unchanged.
control_statesensor (MpvDevStatSensor) decoded the device state wrongly (#42):control.html'sStatefield is the myPV operation-state code (0Standby,1Heat,2Boost heat,3Heat finished,4No control — confirmed against live AC-ELWA-2 captures and the AC-THOR Controls doc), butDEV_STATE_ENUMwas built from the different "status codes" table and read with a+ 1offset. Net effect: every state exceptHeatwas scrambled (e.g.State=3"target reached" showedboost_heat). Fixed by re-keyingDEV_STATE_ENUM/DEV_STATE_ENUM_SOLTHORto the raw operation-state codes and indexing them directly (no offset); missingStatenow keeps the last value. Affects all devices, not just one model. The>=200power-stage error codes and the20/21/22(SolThor21/22/23) Legionella/disabled/blocked entries are kept best-effort and still need device verification.
- Numeric sensors without a unit (e.g. meter power sums) keep their measurement state class again, so long-term statistics are tracked instead of triggering "no longer has a state class" warnings. Non-numeric sensors (versions, IPs, status) correctly have none — delete their orphaned statistics via the repair dialog.
- All device requests are serialized; a command (e.g. set power) overlapping the cyclic poll no longer fails with "Connect call failed" (the device serves one connection at a time).
- Device data and setup are fetched sequentially again; concurrent requests overwhelmed the single-connection myPV web server, flipping entities to "unknown" and breaking setup (regression since v1.3.3).
- Energy sensor names are now translated (they were stuck in English regardless of the configured language).
- German translations for all entity names and states.
- Entities report their value immediately on startup instead of waiting for the first poll.
- Setup retries automatically when the device is unreachable; cleaner unload.
- Declared as a config-entry-only integration (removed the dead YAML import path); passes hassfest without warnings.
- Added a test suite (~98% coverage) and a pre-commit suite (ruff + hassfest).
- Entity names and enum states are now translatable (translation keys); all icons moved to
icons.json. - Network (IP/subnet/gateway/DNS), screen mode, fan speed, firmware versions, firmware update states, power unit temperature and L1 voltage are now diagnostic sensors, disabled by default.
- Device
dataandsetupare fetched concurrently and use Home Assistant's shared HTTP session. - Coordinator now reports
UpdateFailed, so unavailability andConfigEntryNotReadywork correctly. - Polling interval is no longer user-configurable (fixed 10 s, per Home Assistant guidelines); the options flow was removed.
- Large internal cleanup: shared entity base class, fully typed code, ruff/mypy clean.
- Non-numeric sensors (e.g. control source) no longer raise a state class error.
- Reset-energy-sensor service and the "Enable HTTP" switch-off now work.
- Report-only firmware
updateentities for the control unit and the power unit.