I have a use case for the Workday sensor to tell me whether or not some specific day is a workday. I could define a second (third, fourth…) sensor, but then I have to keep all the configs in sync when the existing one is perfectly capable. I was thinking of defining a new service (workday.is_workday
maybe?) that takes a date and returns a boolean value for if the date is a work day. Problem is, the only example I can find for doing this (having the service operate on a specific entity) is the calendar integration, which uses async_setup()
to define the service. That, I believe, works with the YAML config but the workday integration doesn’t support YAML anymore.
Am I able to follow the example in the calendar integration (https://github.com/home-assistant/core/blob/c3977b5eb34a547926888bfe12d62406058f52f1/homeassistant/components/calendar/init.py#L294-L305) but not expose the ability to configure with YAML somehow? Or is there another integration I should use as an example instead?