Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Total Volatile Organic Compounds (tVOC) matter discovery schema #116963

Merged
merged 3 commits into from
May 30, 2024

Conversation

kibergus
Copy link
Contributor

@kibergus kibergus commented May 6, 2024

Proposed change

Adds a little bit of missing configuration to propagate tVOC readings from a Matter device to Home Assistant. Without this patch tVOC readings are ignored. Tested with SenseCAP indicator with indicator-matter firmware.

NOTE: Device needs to be deleted and re-added for the sensor to appear.

If this pull request is not of adequate quality, please consider this to be a feature request to add tVOC sensor to matter integration.

Type of change

  • New feature (which adds functionality to an existing integration)

Additional information

This change would also be needed for #105567

Checklist

  • The code change is tested and works locally.
    • YES
  • Local tests pass. Your PR cannot be merged unless tests pass
    • I am not familiar with HA code ecosystem enough to run tests. But the change is trivial and mechanic. I expect tests to pass.
  • There is no commented out code in this PR.
    • No commented out code.
  • I have followed the [development checklist][dev-checklist]
    • I have not read it.
  • I have followed the [perfect PR recommendations][perfect-pr]
    • I have not read it.
  • The code has been formatted using Ruff (ruff format homeassistant tests)
    • No, I don't have this installed. But formatting matches other entries in the file.
  • Tests have been added to verify that the new code works.
    • No.

To help with the load of incoming pull requests:

  • I have reviewed two other [open pull requests][prs] in this repository.
    • No.

@kibergus kibergus requested a review from a team as a code owner May 6, 2024 23:17
Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kibergus

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant
Copy link

home-assistant bot commented May 6, 2024

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft May 6, 2024 23:17
@home-assistant
Copy link

home-assistant bot commented May 6, 2024

Hey there @home-assistant/matter, mind taking a look at this pull request as it has been labeled with an integration (matter) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of matter can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign matter Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@marcelveldt
Copy link
Member

Thanks for the contribution! The discovery schema looks fine, thanks!
Only thing missing is a test. Just add a fixture from a device that includes this cluster/attribute (may also be a mocked device). See the other tests for examples.

@MartinHjelmare MartinHjelmare changed the title Add Total Volatile Organic Compounds (tVOC) matter discovery schema. Add Total Volatile Organic Compounds (tVOC) matter discovery schema May 19, 2024
@MartinHjelmare MartinHjelmare marked this pull request as draft May 19, 2024 12:10
Adds a little bit of missing configuration to propagate tVOC readings from a Matter device to Home Assistant. Tested with SenseCAP indicator with indicator-matter firmware.
NOTE: Device needs to be deleted and re-added for the sensor to appear.
@marcelveldt
Copy link
Member

A recently added fixture also contained the tVOC measurement so I have just added a test.

@marcelveldt marcelveldt marked this pull request as ready for review May 30, 2024 09:12
@marcelveldt marcelveldt added this to the 2024.6.0 milestone May 30, 2024
@marcelveldt marcelveldt merged commit fc5d58e into home-assistant:dev May 30, 2024
24 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants