Skip to content

Comments

Migrate PumpSteer sensors to SensorEntity and native_value/unit APIs#179

Merged
JohanAlvedal merged 1 commit intocodex/01from
codex/update-pumpsteer-sensors-to-sensorentity
Jan 19, 2026
Merged

Migrate PumpSteer sensors to SensorEntity and native_value/unit APIs#179
JohanAlvedal merged 1 commit intocodex/01from
codex/update-pumpsteer-sensors-to-sensorentity

Conversation

@JohanAlvedal
Copy link
Owner

Motivation

  • Bring the PumpSteer sensor implementations in line with Home Assistant SensorEntity best practices by using native value/unit APIs and modern imports while keeping existing control logic intact.

Description

  • Convert PumpSteerSensor and PumpSteerMLSensor to inherit from SensorEntity and update imports to use homeassistant.components.sensor.
  • Replace legacy state/unit_of_measurement usage with native_value/native_unit_of_measurement and use SensorDeviceClass.TEMPERATURE and SensorStateClass.MEASUREMENT for the main sensor.
  • Expose availability through _attr_available and set the entity icon via _attr_icon, while ensuring the attributes dict does not include friendly_name, unit_of_measurement, device_class, or icon keys; the fake_outdoor_temperature attribute is populated from the native value with one decimal place.
  • No business logic or calculations were changed; only entity base classes, state/unit APIs, and related properties were adjusted.

Testing

  • Ran pytest -q twice in the workspace; collection failed both times with ModuleNotFoundError: No module named 'homeassistant' due to the test environment not providing the Home Assistant package.

Codex Task

@JohanAlvedal JohanAlvedal merged commit 2bd6fd1 into codex/01 Jan 19, 2026
1 of 4 checks passed
@JohanAlvedal JohanAlvedal deleted the codex/update-pumpsteer-sensors-to-sensorentity branch January 20, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant