Skip to content

Releases: triosniolin/ha-priority

0.2.0

Choose a tag to compare

@triosniolin triosniolin released this 11 Oct 21:49

There are now eight levels instead of five, and every one of them can be renamed from the integration's Configure dialog, under Level names. Levels 1 to 4 are unchanged; the new levels sit between Automatic and Default as 5 Occupancy, 6 Peak Demand Limit and 7 Scheduled, and Default moves from 5 to 8. Every level above Default survives a restart.

Upgrading from 0.1.x: your saved default-priority options are migrated for you. However, a priority: 5 written by hand into an automation or script now means Occupancy, which holds and survives a restart, so delete it to get Default back. A priority-control-card with default_priority: 5 should become 8, and templates comparing effective_priority against 5 should compare against 8. Rolling back to 0.1.9 works, as long as you haven't set a default priority of 5 to 7.

If you're already on 0.2.0b1, the only change is the brightness label in item 6.

Fixes in this release:

  1. Devices that come up as unavailable or unknown before reporting their real state now get that state recorded at Default once it arrives, so releasing an override returns them to it instead of leaving them where the override put them. Zigbee, Z-Wave and Thread devices all start this way, as does anything Home Assistant restores as unavailable at startup.
  2. The setup and options forms show proper labels; the translations file was never shipped before.
  3. Opening the picker in more-info scrolls the dialog down to the end of the list.
  4. Picking a level on a group's more-info now applies to the members' own toggles in that dialog.
  5. The tile card feature fits its tile again, as one status line with a Release button, instead of a per-level list that spilled out the bottom.
  6. A light command sent with raw brightness (0 to 255) now shows its level as a percentage instead of a bare ON. Adaptive Lighting and most integrations send it that way. Thanks to Bluhb_ on Reddit for the report and the fix.

Hard-refresh your browser after updating.

0.2.0b1

0.2.0b1 Pre-release
Pre-release

Choose a tag to compare

@triosniolin triosniolin released this 02 Oct 00:46

This is a beta, so HACS only offers it if you've turned on beta versions for the integration. It changes the numbering of the lowest level, so read the upgrade notes before installing.

There are now eight levels instead of five, and every one of them can be renamed from the integration's Configure dialog, under Level names. Levels 1 to 4 are unchanged; the new levels sit between Automatic and Default as 5 Occupancy, 6 Peak Demand Limit and 7 Scheduled, and Default moves from 5 to 8. Every level above Default survives a restart.

Upgrading from 0.1.x: your saved default-priority options are migrated for you. However, a priority: 5 written by hand into an automation or script now means Occupancy, which holds and survives a restart, so delete it to get Default back. A priority-control-card with default_priority: 5 should become 8, and templates comparing effective_priority against 5 should compare against 8. Rolling back to 0.1.9 works, as long as you haven't set a default priority of 5 to 7.

Fixes in this release:

  1. Devices that come up as unavailable or unknown before reporting their real state now get that state recorded at Default once it arrives, so releasing an override returns them to it instead of leaving them where the override put them. Zigbee, Z-Wave and Thread devices all start this way, as does anything Home Assistant restores as unavailable at startup.
  2. The setup and options forms show proper labels; the translations file was never shipped before.
  3. Opening the picker in more-info scrolls the dialog down to the end of the list.
  4. Picking a level on a group's more-info now applies to the members' own toggles in that dialog.
  5. The tile card feature fits its tile again, as one status line with a Release button, instead of a per-level list that spilled out the bottom.

Hard-refresh your browser after updating.

0.1.9

Choose a tag to compare

@triosniolin triosniolin released this 01 Oct 23:07
  • Release all now puts the more-info priority picker back to Default (#3). It used to clear the overrides but leave the picker on the level you had chosen, so the next tap wrote a fresh override straight back. Clearing a light held at Manual and then turning it off now takes two clicks instead of four. Thanks to @lbschenkel for the suggestion.
  • The tile card feature shares the same row and gets the same change. The control card keeps its configured level, since it has no picker to reset.

This is a frontend change; after updating, reload the browser (or restart the companion app) so it picks up the new card.

0.1.8

Choose a tag to compare

@triosniolin triosniolin released this 30 Sep 19:02
  • Groups now pass priority through to their members (#2). A command to a light, switch, fan, cover, valve or media player group reached its members at Default, so a member already held at Manual ignored a Manual group command. Members now take the group's level and lease. Thanks to @lbschenkel for the clear report.
  • Relinquishing a group releases the same level on its members; before, they stayed held with nothing on the group to show it.
  • Native Zigbee groups from ZHA or Zigbee2MQTT send one radio command and never call a service per member, so their members are still recorded at Default.

0.1.7

Choose a tag to compare

@triosniolin triosniolin released this 29 Sep 23:48

Hotfix, recommended for everyone.

  • Adaptive Lighting (and any integration that proxies a service): every light.turn_on could fail with RecursionError until a restart if the other integration registered its proxy after this one wrapped the light services (#1). Fixed. Thanks to @frido100 for the diagnosis.
  • Unloading the integration while such a proxy sits on top now leaves a plain pass-through instead of a handler that raised on every call, and logs that a restart will clear it.
  • The integration now appears in Add Integration. It was declared as a system integration, which Home Assistant leaves out of that list, so it could only be added through a direct link. On older versions, use the Add the integration button in the README.

0.1.6

Choose a tag to compare

@triosniolin triosniolin released this 29 Sep 06:58
  • toggle on covers and valves works under arbitration. It used to fail and leave the priority slot holding a command nothing could run. Climate and media player toggles now go the right way.
  • Out-of-band changes are recorded per domain. A thermostat switched to heat at the wall is no longer recorded as turn_off, which a release would then have re-driven. Locks, covers and valves are now recorded too.
  • Under selected scope, a label or area assigned after setup now brings that entity under arbitration, and area selection includes entities that follow their device's area.
  • The cards escape entity names and states, and a call that mixes armed and unarmed entities no longer spreads one entity's priority to the rest.

0.1.5

Choose a tag to compare

@triosniolin triosniolin released this 29 Sep 05:25

No changes to the integration; release for the HACS default store submission.

0.1.4

Choose a tag to compare

@triosniolin triosniolin released this 29 Sep 05:07
  • Brand icon for HACS
  • Service descriptions call level 5 Default instead of Manual Low

0.1.3

Choose a tag to compare

@triosniolin triosniolin released this 18 Aug 01:36

Bug fixes only. No configuration or behaviour changes to arbitration itself.

The priority pickers now work on mobile

The dropdowns used a native <select>, which the Android companion app opens as
an OS-level window. The WebView dismisses that window on any relayout, and the
priority row rewrites its lease countdowns once a second, so the picker
collapsed the moment you touched it. It was fine on desktop only because a
mousedown opens a dropdown before anything can tear it down.

The pickers are now ordinary buttons and lists. They expand inline in the
more-info dialog, which scrolls, and overlay in the tile card feature and the
control card, where the dashboard has already fixed the card's height. The
compact pickers in a tile card also fit on one line now, where before they
wrapped and the row painted through the bottom edge of the card.

An updated card could take a month to reach you

The card is served with a month-long cache lifetime and its URL carried no
version, so once a browser had the file it never asked for it again. Any
frontend fix could sit invisible for up to thirty-one days while the
integration reported itself updated, and the only cure was clearing the browser
or app cache by hand.

The URL now carries a short hash of the file's contents, so it changes exactly
when the card does. After updating to this release you may still need one hard
refresh
, because the fix cannot reach a browser that is still holding the old
file.

Reloading the integration removed the card entirely

Reloading the config entry unregistered the card and failed to register it
again, leaving no card on any page until Home Assistant was fully restarted.
This affected every previous version.

Also

The cards are now tested in a real browser in CI, in addition to the existing
logic tests. The previous test harness had no layout, no CSS and no real event
dispatch, and could not tell whether a control was reachable on screen at all.

0.1.2

Choose a tag to compare

@triosniolin triosniolin released this 14 Aug 10:58

Patch release: a display fix and a documentation rewrite. No behaviour changes.

Fixed

  • The tile-card feature painted outside its card. It mounted the same row the more-info dialog uses, which is built for a wide sheet: hui-card-features sizes its children to a single control row, and the slot columns had minimum widths that do not fit half a dashboard column, so the countdown and the Release button were pushed past the card edge. The feature now opts out of the imposed height and lays its columns out with subgrid, so they stay aligned as the level name shrinks.

Documentation

The README has been rewritten in response to feedback on the launch thread.

  • Corrected a wrong claim. It said Home Assistant has no concept of who commanded an entity. Context exists and can be traced or branched on; what is missing is authority, an arbiter between two callers that both want the same entity.
  • Added a service reference. priority.set, priority.relinquish, priority.relinquish_all and priority.get each have a section now, with the full get response shape and the two things that cost people time: slot keys are strings, and effective_* is null only when nothing holds the entity, which is not the same as Default holding it.
  • Added screenshots, an array walkthrough, the physical-switch behaviour, two worked examples, and the configuration options, which were previously undocumented.

Upgrading: hard-refresh your browser after updating so the corrected card JS loads.