diff -ruN -x __pycache__ a/electrolux_washing_machine_macs/binary_sensor.py b2/electrolux_washing_machine_macs/binary_sensor.py --- a/electrolux_washing_machine_macs/binary_sensor.py 2026-10-15 17:53:20.310514962 +0800 +++ b2/electrolux_washing_machine_macs/binary_sensor.py 2026-10-15 20:18:34.291175386 +0800 @@ -18,6 +18,7 @@ CONF_EXTRA_RINSE = "extra_rinse" CONF_SOFT_PLUS = "soft_plus" CONF_EASY_IRON = "easy_iron" +CONF_LID_OPEN = "lid_open" TYPES = [ CONF_POWERED_ON, @@ -28,6 +29,7 @@ CONF_EXTRA_RINSE, CONF_SOFT_PLUS, CONF_EASY_IRON, + CONF_LID_OPEN, ] CONFIG_SCHEMA = cv.Schema( @@ -52,6 +54,9 @@ ), cv.Optional(CONF_EASY_IRON): binary_sensor.binary_sensor_schema( ), + cv.Optional(CONF_LID_OPEN): binary_sensor.binary_sensor_schema( + device_class=DEVICE_CLASS_DOOR, + ), } ).extend(cv.COMPONENT_SCHEMA) diff -ruN -x __pycache__ a/electrolux_washing_machine_macs/electrolux_washing_machine_macs.cpp b2/electrolux_washing_machine_macs/electrolux_washing_machine_macs.cpp --- a/electrolux_washing_machine_macs/electrolux_washing_machine_macs.cpp 2026-10-15 17:53:20.310530794 +0800 +++ b2/electrolux_washing_machine_macs/electrolux_washing_machine_macs.cpp 2026-10-15 20:18:34.291200079 +0800 @@ -44,6 +44,17 @@ break; case MACS_MESSAGE_TYPE_STATE: +#ifdef USE_SENSOR + if (this->state_code_sensor_) this->state_code_sensor_->publish_state(data[2]); + if (this->phase_code_sensor_ && data.size() > 3) this->phase_code_sensor_->publish_state(data[3]); + if (this->state_flags_sensor_ && data.size() > 5) this->state_flags_sensor_->publish_state(data[5]); +#endif +#ifdef USE_BINARY_SENSOR + // In STANDBY (the washer switches itself off after a cycle) data[5] reads 0x08 whatever the lid is + // doing, so only trust the bit while the panel is awake; in standby hold the last known lid state. + if (this->lid_open_binary_sensor_ && data.size() > 5 && data[2] != esphome::electrolux_macs::MACS_APPLIANCE_STATE_STANDBY) + this->lid_open_binary_sensor_->publish_state((data[5] & 0x08) != 0); +#endif switch (data[2]) { case MACS_APPLIANCE_STATE_STANDBY: #ifdef USE_BINARY_SENSOR diff -ruN -x __pycache__ a/electrolux_washing_machine_macs/electrolux_washing_machine_macs.h b2/electrolux_washing_machine_macs/electrolux_washing_machine_macs.h --- a/electrolux_washing_machine_macs/electrolux_washing_machine_macs.h 2026-10-15 17:53:20.310546755 +0800 +++ b2/electrolux_washing_machine_macs/electrolux_washing_machine_macs.h 2026-10-15 20:18:34.291224045 +0800 @@ -37,6 +37,9 @@ SUB_SENSOR(current_water_temperature) SUB_SENSOR(total_working_hours) SUB_SENSOR(total_cycles) + SUB_SENSOR(state_code) // top loader: raw 0x52 data[2] + SUB_SENSOR(phase_code) // raw 0x52 data[3] + SUB_SENSOR(state_flags) // raw 0x52 data[5] (bit 0x08 = lid open on the WWT8084J7WA) #endif #ifdef USE_TEXT_SENSOR @@ -53,6 +56,7 @@ SUB_BINARY_SENSOR(extra_rinse) SUB_BINARY_SENSOR(soft_plus) SUB_BINARY_SENSOR(easy_iron) + SUB_BINARY_SENSOR(lid_open) #endif protected: diff -ruN -x __pycache__ a/electrolux_washing_machine_macs/__init__.py b2/electrolux_washing_machine_macs/__init__.py --- a/electrolux_washing_machine_macs/__init__.py 2026-10-15 17:53:20.310482597 +0800 +++ b2/electrolux_washing_machine_macs/__init__.py 2026-10-15 20:18:34.291294071 +0800 @@ -20,7 +20,7 @@ CONFIG_SCHEMA = CONFIG_SCHEMA_BASE.extend({ cv.GenerateID(): cv.declare_id(ElectroluxWashingMachineMacsComponent), - cv.Optional(CONF_MOTOR_DRUM_RATIO): cv.float_range(0, 100), + cv.Optional(CONF_MOTOR_DRUM_RATIO, default=1.0): cv.float_range(0, 100), # upstream has no default -> KeyError at build }) async def to_code(config): diff -ruN -x __pycache__ a/electrolux_washing_machine_macs/sensor.py b2/electrolux_washing_machine_macs/sensor.py --- a/electrolux_washing_machine_macs/sensor.py 2026-10-15 17:53:20.310560035 +0800 +++ b2/electrolux_washing_machine_macs/sensor.py 2026-10-15 20:18:34.291246512 +0800 @@ -30,6 +30,9 @@ CONF_CURRENT_WATER_TEMPERATURE = "current_water_temperature" CONF_TOTAL_WORKING_HOURS = "total_working_hours" CONF_TOTAL_CYCLES = "total_cycles" +CONF_STATE_CODE = "state_code" +CONF_PHASE_CODE = "phase_code" +CONF_STATE_FLAGS = "state_flags" TYPES = [ CONF_REMAINING_TIME, @@ -42,12 +45,18 @@ CONF_CURRENT_DRUM_SPEED, CONF_CURRENT_WATER_TEMPERATURE, CONF_TOTAL_WORKING_HOURS, - CONF_TOTAL_CYCLES + CONF_TOTAL_CYCLES, + CONF_STATE_CODE, + CONF_PHASE_CODE, + CONF_STATE_FLAGS, ] CONFIG_SCHEMA = cv.Schema( { cv.GenerateID(CONF_ELECTROLUX_WASHING_MACHINE_MACS_ID): cv.use_id(ElectroluxWashingMachineMacsComponent), + cv.Optional(CONF_STATE_CODE): sensor.sensor_schema(accuracy_decimals=0, icon="mdi:state-machine"), + cv.Optional(CONF_PHASE_CODE): sensor.sensor_schema(accuracy_decimals=0, icon="mdi:washing-machine"), + cv.Optional(CONF_STATE_FLAGS): sensor.sensor_schema(accuracy_decimals=0, icon="mdi:flag-outline", entity_category=ENTITY_CATEGORY_DIAGNOSTIC), cv.Optional(CONF_REMAINING_TIME): sensor.sensor_schema( unit_of_measurement=UNIT_MINUTE, accuracy_decimals=0,