Closed wleese closed 10 months ago
That is indeed true, as I haven't found a nice way around it. HomeAssistant does not support multi-selects. So if I want to allow all possible combination of days, that would end-up at 127 possibilities per alarm. I choose to support a limited set (weekdays, weekends, everyday and tomorrow) which I think suits most needs. I could add the individual days (so 7 extra possibilities), but adding all combinations I don't see as a good option.
If HomeAssistant supports multi-select entities, I will implement this for the alarm days (see e.g. https://community.home-assistant.io/t/wth-dont-we-have-a-helper-selector-that-allows-multiple-selections/467657).
Maybe you have other ideas how to implement this (without breaking current functionality).
Perhaps an additional text input field/entity (accepting day numbers where 0 = Monday, or strings such as MON, TUE, all comma separated) that gets used when the current days value == “custom”? I guess because you’ve already implemented several possibilities already, an additional field focussing on the last missing feature would be fair.
My use case is that I need to set an alarm for different times depending on the day. So the Monday and Tuesday alarm differs from the Wednesday alarm, which again differs from Thursday and Friday. SleepMapper does this fine obviously with its dropdown+checkbox widget.
I was thinking something similar yesterday, if I find some time I will try to implement this. Likely it will be a comma-seperated list of days.
That’d be awesome. If you manage it and have a digital tip jar, I’d love to leave a tip.
I've been playing around with it today and update the master tree. I created a text input where you can list the days (3 letter abbreviations) the alarm should be ringing. This list should be comma-seperated without white-spaces. I did some quick checks at home and it seems to be working. Could you have a look if it works fine like this (download the master
version)? Let me know if it works, I will create a new release with this function.
It looks great! I tested it by using the entities in HA, checking to see if the changes were reflected in SleepMapper, and then reverse: were changes in SleepMapper reflected in HA. And it works perfectly so far.
Thank you!
When I used SleepMapper to set an alarm, I select certain days for that alarm. I've just added the integration, but see that for my alarm
select.somneo_wakeup_light_alarm0_days
has valueUnknown
.I'd expect to see the day I selected for this alarm, and the ability to change it via this integration.
If there's anything I can do to help debug, let me know :)