Skip to content

Add notification binary_sensor to Plugwise integration#41473

Merged
ctalkington merged 27 commits intohome-assistant:devfrom
plugwise:plugwise-notifications
Nov 17, 2020
Merged

Add notification binary_sensor to Plugwise integration#41473
ctalkington merged 27 commits intohome-assistant:devfrom
plugwise:plugwise-notifications

Conversation

@CoMPaTech
Copy link
Copy Markdown
Member

@CoMPaTech CoMPaTech commented Oct 8, 2020

Proposed change

Adding notifications (warnings/errors) from the Plugwise Smile to Home Assistant.
Both as notification for the persistent notifications handling and as binary_sensor to indicate notification present.

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)
  • 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
  • [ x There is no commented out code in this PR.
  • I have followed the [development checklist][dev-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:

  • Documentation added/updated for [www.home-assistant.io][docs-repository]

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

  • The [manifest file][manifest-docs] 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.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

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

@probot-home-assistant
Copy link
Copy Markdown

Hey there @bouwew, mind taking a look at this pull request as its been labeled with an integration (plugwise) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@CoMPaTech CoMPaTech marked this pull request as ready for review October 8, 2020 08:20
Copy link
Copy Markdown
Contributor

@bouwew bouwew left a comment

Choose a reason for hiding this comment

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

Looking good!

@CoMPaTech CoMPaTech force-pushed the plugwise-notifications branch 2 times, most recently from 9c03e92 to 1681255 Compare October 15, 2020 21:04
@CoMPaTech
Copy link
Copy Markdown
Member Author

CoMPaTech commented Oct 15, 2020

Catching up with dev and as per failing 48f6987 and 00ecb01 (codecov-patch) asked for advise (tnx @derekatkins and @bdraco) and found out we did bump our module version but not the forthcoming tests in #41550. These were needed for the notifications to be eligible (it obviously turned out while actually testing the patch).

Code should now appropriately run tests on the patch (i.e. delete a notification and find one present from fixtures).

@CoMPaTech
Copy link
Copy Markdown
Member Author

Should be fine for final review and eventual merge

@CoMPaTech
Copy link
Copy Markdown
Member Author

Catchup with dev - still waiting eagerly for review. (Our backlog of changes is building waiting for these PRs to be merged, among them the requested integration closing #35713).

@CoMPaTech CoMPaTech force-pushed the plugwise-notifications branch from a0cc9d1 to dc3ca29 Compare November 8, 2020 18:18
@CoMPaTech
Copy link
Copy Markdown
Member Author

@ctalkington anything else we should do to it or just waiting for after beta-cutoff? (no rush, just checking, so we can shift our focus to further drafting #43036 and working on the USB-one in advance)

@ctalkington
Copy link
Copy Markdown
Contributor

@CoMPaTech just havent had as much time lately, ill try to wrap up review tonight or this weekend at latest

@CoMPaTech CoMPaTech changed the title Add notifications to Plugwise integration Add notification binary_sensor to Plugwise integration Nov 13, 2020
if msg_type not in SEVERITIES:
msg_type = "other"

self._attributes[f"{msg_type.lower()}_msg"] = msg
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is it possible for there to be more than one of a type at a time? this logic seems like it would overwrite and just show last msg of each type.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think it gives more than one (and/or of each) - @bouwew can you check?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@ctalkington discussed offline and we've decided to ensure it wouldn't override, fb8a18f incorporates this

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Copy link
Copy Markdown
Contributor

@ctalkington ctalkington left a comment

Choose a reason for hiding this comment

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

thanks for the followup during review!

@ctalkington ctalkington merged commit ed36cb7 into home-assistant:dev Nov 17, 2020
KJonline pushed a commit to Pyhass/core that referenced this pull request Nov 17, 2020
* 'dev' of https://github.com/home-assistant/core: (77 commits)
  Fix kodi media_player unavailable at start (home-assistant#41714)
  Add an option to template delay_on/off in template binary sensor (home-assistant#43259)
  Bump hatasmota to 0.0.31 (home-assistant#43319)
  Update cloud integration to 0.38.0 (home-assistant#43314)
  Add progress translation key to hassfest (home-assistant#43311)
  Bump codecov/codecov-action from v1.0.14 to v1.0.15 (home-assistant#43304)
  Improvement to allow parsing of station ID in vasttrafik integration. Addresses home-assistant#34851 (home-assistant#43136)
  Abort vizio discovery flow without unique ID (home-assistant#43303)
  Update directv to 0.4.0 (home-assistant#43302)
  Add notification binary_sensor to Plugwise integration (home-assistant#41473)
  [ci skip] Translation update
  Bump bimmer_connected to 0.7.13 (home-assistant#43294)
  Bump aioguardian to 1.0.4 (home-assistant#43299)
  Refactor how entities are created for homekit_controller services (home-assistant#43242)
  Updated frontend to 20201111.1 (home-assistant#43298)
  Update pytradfri to 7.0.4 (home-assistant#43297)
  Remove pts adjustments in stream (home-assistant#42399)
  Fix Enigma2 available entity property (home-assistant#43292)
  Make MQTT climate return PRESET_NONE when no preset is set (home-assistant#43257)
  Bump env_canada to 0.2.4, fix config validation (home-assistant#43251)
  ...
Copy link
Copy Markdown

@deltachonglee81 deltachonglee81 left a comment

Choose a reason for hiding this comment

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

@on

@CoMPaTech
Copy link
Copy Markdown
Member Author

@on

?

@home-assistant home-assistant locked as resolved and limited conversation to collaborators Nov 18, 2020
@CoMPaTech CoMPaTech deleted the plugwise-notifications branch March 13, 2022 18:59
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.

8 participants