diff --git a/src/pooldose/mappings/model_PDPR1H1HAW100_FW539187.json b/src/pooldose/mappings/model_PDPR1H1HAW100_FW539187.json index 0c0ca78..ba6917e 100644 --- a/src/pooldose/mappings/model_PDPR1H1HAW100_FW539187.json +++ b/src/pooldose/mappings/model_PDPR1H1HAW100_FW539187.json @@ -212,10 +212,10 @@ }, "circulation_pump_status": { "key": "w_1eo2fpohe", - "type": "sensor", + "type": "binary_sensor", "conversion": { - "|PDPR1H1HAW100_FW539187_LABEL_w_1eo2fpohe_DISABLED_|": "disabled", - "|PDPR1H1HAW100_FW539187_LABEL_w_1eo2fpohe_ENABLED|": "enabled" + "|PDPR1H1HAW100_FW539187_LABEL_w_1eo2fpohe_DISABLED_|": false, + "|PDPR1H1HAW100_FW539187_LABEL_w_1eo2fpohe_ENABLED|": true } }, "peristaltic_cl_dosing": { @@ -247,18 +247,18 @@ }, "power_on_delay_status": { "key": "w_1fhb0hqu2", - "type": "sensor", + "type": "binary_sensor", "conversion": { - "|PDPR1H1HAW100_FW539187_LABEL_w_1fhb0hqu2_DISABLE|": "disabled", - "|PDPR1H1HAW100_FW539187_LABEL_w_1fhb0hqu2_ENABLE|": "enabled" + "|PDPR1H1HAW100_FW539187_LABEL_w_1fhb0hqu2_DISABLE|": false, + "|PDPR1H1HAW100_FW539187_LABEL_w_1fhb0hqu2_ENABLE|": true } }, "flow_delay_status": { "key": "w_1fhb0ht7t", - "type": "sensor", + "type": "binary_sensor", "conversion": { - "|PDPR1H1HAW100_FW539187_LABEL_w_1fhb0ht7t_DISABLE|": "disabled", - "|PDPR1H1HAW100_FW539187_LABEL_w_1fhb0ht7t_ENABLE|": "enabled" + "|PDPR1H1HAW100_FW539187_LABEL_w_1fhb0ht7t_DISABLE|": false, + "|PDPR1H1HAW100_FW539187_LABEL_w_1fhb0ht7t_ENABLE|": true } }, "time_off_ph_dosing": { diff --git a/tests/test_mapping_info.py b/tests/test_mapping_info.py index 1f98424..1acfdd7 100644 --- a/tests/test_mapping_info.py +++ b/tests/test_mapping_info.py @@ -86,8 +86,8 @@ async def test_total_entity_count(self, mapping): async def test_entity_type_counts(self, mapping): """Test entity count per type.""" types = mapping.available_types() - assert len(types.get("sensor", [])) == 22 - assert len(types.get("binary_sensor", [])) == 20 + assert len(types.get("sensor", [])) == 19 + assert len(types.get("binary_sensor", [])) == 23 assert len(types.get("number", [])) == 8 assert len(types.get("switch", [])) == 3 assert len(types.get("select", [])) == 1 @@ -107,6 +107,9 @@ async def test_new_alarm_binary_sensors(self, mapping): "alarm_cl_too_high_orp", "alarm_cl_too_high", "alarm_system_standby", + "circulation_pump_status", + "power_on_delay_status", + "flow_delay_status", ] for alarm in expected_alarms: assert alarm in types["binary_sensor"], f"Missing binary_sensor: {alarm}" @@ -115,12 +118,9 @@ async def test_new_sensors_with_conversions(self, mapping): """Test new sensors with conversion dictionaries.""" sensors = mapping.available_sensors() sensors_with_conversion = [ - "circulation_pump_status", "peristaltic_cl_dosing", "device_config", "temperature_unit", - "power_on_delay_status", - "flow_delay_status", ] for name in sensors_with_conversion: assert name in sensors, f"Missing sensor: {name}"