Skip to content

Added device_class for the applicable sensors.#17

Open
craimasjien wants to merge 1 commit into
MarstekEnergy:marstek-devfrom
craimasjien:marstek-dev
Open

Added device_class for the applicable sensors.#17
craimasjien wants to merge 1 commit into
MarstekEnergy:marstek-devfrom
craimasjien:marstek-dev

Conversation

@craimasjien

Copy link
Copy Markdown

Add device_class to Marstek sensors

Previously, the Marstek sensors did not specify a device_class, which meant Home Assistant could not automatically categorize them or offer features like unit conversion, long-term statistics, or energy dashboard integration.

The following device_class attributes were added:

Sensor Unit device_class
Battery SOC % battery
Grid Power W power
PV Power (×4 channels) W power
PV Voltage (×4 channels) V voltage
PV Current (×4 channels) A current

Diagnostic sensors (device IP, version, MAC addresses) and status sensors (device mode, battery status) remain without a device_class, as they represent non-numeric information.

@Hammer-NL Hammer-NL left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I hope Marstek wakes up soon to merge this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants