Skip to content

Add HomeKit firmware revision characteristic#14112

Closed
schmittx wants to merge 2 commits intohome-assistant:devfrom
schmittx:homekit-firmware-revision-characteristic
Closed

Add HomeKit firmware revision characteristic#14112
schmittx wants to merge 2 commits intohome-assistant:devfrom
schmittx:homekit-firmware-revision-characteristic

Conversation

@schmittx
Copy link
Copy Markdown
Contributor

@schmittx schmittx commented Apr 27, 2018

Description:

Adds characteristic to accessory information service for firmware revision. By default, firmware revision is set to current Home Assistant version.

fullsizeoutput_3de5

Related issue (if applicable): N/A

Pull request in home-assistant.github.io with documentation (if applicable): N/A

Example entry for configuration.yaml (if applicable):

N/A

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@cdce8p cdce8p self-assigned this Apr 27, 2018
Copy link
Copy Markdown
Member

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

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

I'm not really sure this is necessary, but we can certainly add it.
Can you combine this PR into #14114?

service.get_characteristic(CHAR_MANUFACTURER).set_value(manufacturer)
service.get_characteristic(CHAR_SERIAL_NUMBER).set_value(serial_number)
(service.get_characteristic(CHAR_FIRMWARE_REVISION)
.set_value(firmware_revision))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use the following instead:

    service.get_characteristic(CHAR_FIRMWARE_REVISION) \
        .set_value(firmware_revision)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@schmittx
Copy link
Copy Markdown
Contributor Author

I agree, not exactly necessary but I though it worked nicely to use the Home Assistant version. I've added this to #14114.

@schmittx schmittx closed this Apr 27, 2018
@schmittx schmittx deleted the homekit-firmware-revision-characteristic branch May 7, 2018 02:18
@home-assistant home-assistant locked and limited conversation to collaborators Sep 5, 2018
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.

3 participants