Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to associate a regdata value with a sub-device #55

Open
3 of 6 tasks
denpamusic opened this issue Dec 14, 2023 · 0 comments
Open
3 of 6 tasks

Add ability to associate a regdata value with a sub-device #55

denpamusic opened this issue Dec 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@denpamusic
Copy link
Owner

Is there an existing issue for this?

  • I have searched the existing issues

I want to suggest:

  • support for a new product
  • new functionality for a product
  • documentation improvement
  • other

Feature description

Suggested by @jszkiela72 here: #54 (comment)

As these are device model-specific anyway, it could be done within the descriptor like in example below, but should probably require a associated device existence check within async_added_to_hass() method of the entity class itself.

RegdataSensorEntityDescription(
    key=134,
    translation_key="mixer_valve_opening_percentage",
    filter_fn=lambda x: throttle(on_change(x), seconds=UPDATE_INTERVAL),
    native_unit_of_measurement=PERCENTAGE,
    product_models={ProductModel.ECOMAX_860P6_O},
    state_class=SensorStateClass.MEASUREMENT,
    suggested_display_precision=0,
    value_fn=lambda x: x,

    associated_devices={"mixer_1"},
)

Webpage of the product, that I'm suggesting:

No response

My diagnostics data:

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@denpamusic denpamusic added the enhancement New feature or request label Dec 14, 2023
Repository owner deleted a comment from jontofront Dec 16, 2023
Repository owner deleted a comment from jontofront Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant