Skip to content

About

Extend Matter Functionality beyond what Core Home Assistant Provides

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Matter Extensions

HACS custom integration that adds Matter functionality core Home Assistant does not expose yet. It talks to the already-connected Matter Server client (no extra websocket).

Currently it includes On with timed off (OnOff cluster command 0x42):

  1. Multiple entities in one action
  2. Frontend filtering so the entity picker only lists devices whose On/Off cluster accepts OnWithTimedOff
  3. Wrapper follow-through for template entities and Switch as X helpers (for example a template fan that fronts a Matter switch) — the command is sent to the underlying switch
  4. Diagnostic duration sensors for remaining OnTime and OffWaitTime on each supporting Matter device

Installation

You can install this component in two ways: via HACS or manually.

Option A: Installing via HACS (custom repository)

  1. Open HACS
  2. Integrations → ⋮ → Custom repositories
  3. Add https://github.com/PhantomPhoton/Matter-Extensions as an Integration
  4. Install "Matter Extensions"
  5. Restart Home Assistant
  6. Go to "Settings->Devices & Services".
  7. Click "+ Add Integration".
  8. Search for "Matter Extensions"
  9. Select the integration and Follow setup workflow

Option B: Manual installation (custom_component)

  1. Copy the custom_components/matter_extensions directory to your custom_components directory
  2. Restart Home Assistant
  3. Go to "Settings->Devices & Services".
  4. Click "+ Add Integration".
  5. Search for "Matter Extensions"
  6. Select the integration and Follow setup workflow

Action

matter_extensions.on_with_timed_off

Field Required Notes
Target entities yes One or more. The picker is limited to entities that support the command, including wrappers.
on_time yes Duration selector. Max 1 hour, 49 minutes, 13 seconds (0xFFFE tenths of a second).
off_wait_time no Lockout after the device turns off. Same max. Empty means no lockout.
accept_only_when_on yes If true, ignored when the device is already off. Defaults to false.

Example:

action: matter_extensions.on_with_timed_off
target:
  entity_id:
    - fan.bathroom
    - switch.kitchen_outlet
data:
  on_time:
    minutes: 5
  off_wait_time:
    seconds: 30
  accept_only_when_on: false

The device itself owns the timer. Sending the command again while it is still on extends the remaining on time to whichever is longer. During the off-wait lockout, another On with timed off will not turn it back on (a normal turn-on still works).

The action can return a response with per-entity results.

Sensors

For each Matter switch, light, or fan whose On/Off cluster supports On with timed off, two duration sensors are created for that entity (a dual Eve outlet therefore gets a pair per plug, not one pair for the whole device):

Sensor Matter attribute Meaning
On time OnOff OnTime (0x4001) Remaining on duration. The device counts this down in tenths of a second.
Off wait OnOff OffWaitTime (0x4002) Remaining lockout after it turns off.

They use Home Assistant's duration device class (seconds), are marked diagnostic, and appear on the same Matter device as the plug.

How wrappers are resolved

  • Matter switch / light (and other On/Off domains): command is sent to that entity if the cluster lists OnWithTimedOff.
  • Switch as X (“Change type of a switch”, e.g. switch → fan): follows the wrapped switch.
  • Template entities: reads turn_on actions first, then the state template, and follows referenced switch.* / light.* entities.

If a wrapper cannot be resolved to a supporting Matter entity, the action fails for that target.

Thanks

Build on top of the great work by Ted and RSmith on the inovelli community forums.

My other Home Assistant custom components

  • S3 Compatible - Allows self hosted S3 compatible endpoints as Home Assistant backup targets
  • Setup Codes - Integrated database of Matter and HomeKit device Setup Codes

About

Extend Matter Functionality beyond what Core Home Assistant Provides

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages