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 support to fully_kiosk for hybrid local push/pull switches using MQTT #89010

Merged
merged 11 commits into from
Nov 23, 2023

Conversation

mheath
Copy link
Contributor

@mheath mheath commented Mar 2, 2023

Breaking change

Proposed change

This is the first step in a larger goal of adding a motion binary sensor to to the Fully Kiosk integration. This commit provides support for using MQTT to update the screen and screen saver switches immediately (when MQTT is enabled in HA and in FKB) instead of waiting to poll the kiosk. Also, there are other entities that could have local push support using MQTT. I will submit PRs for that once this PR is accepted.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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

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

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant
Copy link

home-assistant bot commented Mar 2, 2023

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

Code owner commands

Code owners of fully_kiosk 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 fully_kiosk Removes the current integration label and assignees on the pull request, add the integration domain after the command.

Copy link
Member

@cgarwood cgarwood left a comment

Choose a reason for hiding this comment

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

Looks OK to me, but might be good for someone more familiar with MQTT to take a quick look.

@mheath
Copy link
Contributor Author

mheath commented Mar 24, 2023

Is there anything I can do to get this in someone's queue to get a second review?

@mheath mheath marked this pull request as draft May 4, 2023 23:04
@mheath mheath marked this pull request as ready for review May 4, 2023 23:05
@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Jun 21, 2023
@emontnemery emontnemery changed the title Support hybrid local push/pull switches using MQTT Add support for hybrid local push/pull switches using MQTT to fullykiosk Jun 28, 2023
@emontnemery emontnemery changed the title Add support for hybrid local push/pull switches using MQTT to fullykiosk Add support to fully_kiosk for hybrid local push/pull switches using MQTT Jun 28, 2023
@home-assistant home-assistant bot marked this pull request as draft June 28, 2023 07:24
@home-assistant
Copy link

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.

@frenck frenck removed the smash Indicator this PR is close to finish for merging or closing label Jun 28, 2023
Co-authored-by: Erik Montnemery <erik@montnemery.com>
@mheath mheath marked this pull request as ready for review June 28, 2023 21:23
@home-assistant home-assistant bot requested a review from emontnemery June 28, 2023 21:23
@mheath
Copy link
Contributor Author

mheath commented Aug 11, 2023

@emontnemery I finally got around to finishing the change you requested. Could you please take another look and let me know if there's anything that needs to be fixed for this to get merged?

@mheath
Copy link
Contributor Author

mheath commented Nov 8, 2023

@emontnemery Could you take another look at this PR?

Copy link
Contributor

@emontnemery emontnemery left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @mheath 👍

@emontnemery emontnemery merged commit d460ead into home-assistant:dev Nov 23, 2023
20 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 24, 2023
@mheath mheath deleted the fully-kiosk-mqtt-support branch November 27, 2023 21:48

topic_template = data["settings"]["mqttEventTopic"]
topic = (
topic_template.replace("$appId", "fully")
Copy link
Member

Choose a reason for hiding this comment

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

Please move all the MQTT data and topic parsing to the 3rd party library. The library can accept callbacks for MQTT subscribe and publish that Home Assistant can provide and then the library can handle the logic and parsing as needed.

@home-assistant home-assistant unlocked this conversation Dec 17, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2023
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.

5 participants