2022.4: Groups! Groups! Groups!

Looks like you used England as the country when you should have used GB as per the docs:

https://www.home-assistant.io/integrations/workday/#country

You can’t blame this one on Home Assistant.

1 Like

England has different holidays to other countries in GB - So this was an advised workaround.

It’s worked for over 12 months and has been broken in a recent change.

Hence it is a breaking change.

Hence I can blame HA.

6 Likes

I don’t use this at all, but reading the documentation, shouldn’t you be putting ‘England’ under the ‘province’ key, with ‘GB’ as the ‘country’ key?

2 Likes

Yep. As I said, misconfigured. Should be:

- platform: workday
  country: GB
  province: England

You probably got away with it for 12 months because it was not working but only generating errors in the log. Now it fails to load. Which is better as it alerts you to the fact that you need to fix it.

Not a HA problem…the underlying Python library for Holidays is broken for Ireland and changed for GB, the logic is wrong in its current version.

There are GitHub issues open in its repository and also forum post on here about it.

I was just looking through the issues and PRs, UK was dropped for GB,

https://github.com/home-assistant/core/pull/67508

That should have been a breaking change.

3 Likes

Yeah probably…
Apart from GB the library has borked Ireland as well…doesn’t exist anymore in there so I’m getting no holidays at all :see_no_evil:
Now there’s a breaking change :stuck_out_tongue_closed_eyes:

No, haven’t found one yet.

So now we can create groups in the ui. Does this create a deconz group too. When a group is made in deconz Will we see it as a group in ha too? Before 2022.4, a deconz group was an ordinary entity in ha, with no group members.

This work around was given to me by a senior dev, so I don’t think it could be classed as misconfigured.

GB with province England doesn’t work either - at least according to some incidental reports on GitHub. Impossible to know until there is a holiday in Scotland but not in England.

Appreciate you spotting that there should have been a breaking change report regardless.

Alas. My final comment circles back on my first in this thread.

I love HA but it’s so frustrating.

2 Likes

No, just groups in HA.

Try with:
gb_uk_holidays = holidays.country_holidays(‘GB’, subdiv=‘UK’)

This is what the github says:

us_pr_holidays = holidays.country_holidays(‘US’, subdiv=‘PR’)
‘2018-01-06’ in us_holidays # False
‘2018-01-06’ in us_pr_holidays # True

And below HA workday:

PLATFORM_SCHEMA = PARENT_PLATFORM_SCHEMA.extend(
    {
        vol.Required(CONF_COUNTRY): valid_country,
        vol.Optional(CONF_EXCLUDES, default=DEFAULT_EXCLUDES): vol.All(
            cv.ensure_list, [vol.In(ALLOWED_DAYS)]
        ),
        vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
        vol.Optional(CONF_OFFSET, default=DEFAULT_OFFSET): vol.Coerce(int),
        vol.Optional(CONF_PROVINCE): cv.string,
        vol.Optional(CONF_WORKDAYS, default=DEFAULT_WORKDAYS): vol.All(
            cv.ensure_list, [vol.In(ALLOWED_DAYS)]
        ),
        vol.Optional(CONF_ADD_HOLIDAYS, default=[]): vol.All(
            cv.ensure_list, [cv.string]
        ),
        vol.Optional(CONF_REMOVE_HOLIDAYS, default=[]): vol.All(
            cv.ensure_list, [cv.string]
        ),
    }

Edit: Only way i can tell, as i don’t use this component

1 Like

As Sun and Uptime are now available via UI, three questions in this regards.

  1. So I can (have later to) delete Uptime sensor from config.yaml? I didn’t get the standard message in log as in other integrations who moved or are moving to UI.

  2. As it was not necessary to add Sun before in config.yaml, what will happen if I delete the integration? As it was before in default_config. Now not anymore?

  3. Why does sun integration not show the sun.sun entity in the integration? Other integrations show their devices/entities. Or perhaps only a local problem?

Every question is answered in the sun documentation except for the entity not showing up in the UIs config.

It’s still part of default config.

If you don’t have it in your yaml config, you can add it via the ui.

I’m not sure why the entity doesn’t show up in the integration. I’d guess that it probably does show up if it’s configured via the UI and not yaml (default config/ sun in your yaml)

I you mean I restarted HA, then yes.

I’ve removed sun from my configuration.yaml and don’t use default config. I don’t see the entity in the integration either. Probably a design choice? :man_shrugging:

The dialogue text doesn’t explain whether it should be the delta or not, but looking at the change log it seems like it should be the actual values. Not the delta.

In the example image from the log the values seem to be shown, not already filled out delta’s.

Are you using MariaDB by any chance? I’m not seeing any other users who have the same issue and MariaDB is the only factor I can think of that the two HASS instances I’m running have in common.

Hopefully this will get fixed in future updates. I can’t wait to fix my graphs.

Ooh, so technically, nothing changed.
Turning on one deconz group containing 6 lamps, results in one request to that deconz group. One request to a ha group of 6 lamps, results in 6 requests…

Of course it did: it’s now possible to create HA groups from the UI. That’s a pretty big change.