natekspencer / hacs-pura

Home Assistant integration for Pura smart fragrance diffusers
MIT License
18 stars 1 forks source link

Use Fragrance names instead of "Slot_" in Control #67

Closed DellanX closed 1 month ago

DellanX commented 1 month ago

The request

I wish that instead of saying "slot_1" and "slot_2" the select had the fragrances loaded into those slots. This would be helpful for creating an automation that coordinates the fragrances across my devices.

I think it shouldn't be too difficult. Maybe by taking the fragrance<->slot information from https://github.com/natekspencer/hacs-pura/blob/2109501b1002d500950c628b2ea2ff36a7294f78/custom_components/pura/sensor.py#L106 And replacing the returned list at: https://github.com/natekspencer/hacs-pura/blob/2109501b1002d500950c628b2ea2ff36a7294f78/custom_components/pura/select.py#L87

Or, if others prefer to have "Slot 1" and "Slot 2" maybe it'd be better to make a configuration option?

Screenshots

image

Which Pura device(s) is this request for?

Additional information

No response

natekspencer commented 1 month ago

This was actually how I originally implemented it, but see https://github.com/natekspencer/hacs-pura/discussions/30 for a discussion around why it was changed.

You're use case is interesting, and I see why that would make it easier for that. But it's a little more unique and believe it can be accomplished with information already available. I'm going to close this request for now as I don't plan on implementing it. But feel free to add to that discussion thread.

DellanX commented 1 month ago

Any concerns against me making a PR for optional config for this that defaults to the current method, but allows for using the fragrance name?

natekspencer commented 1 month ago

No issues from me at the moment. But the discussion will need to happen when you open the PR