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 Homeassistant Analytics Insights integration #107634

Merged
merged 33 commits into from
Jan 23, 2024

Conversation

joostlek
Copy link
Member

@joostlek joostlek commented Jan 9, 2024

Proposed change

As developer, have you ever wanted to automate your firework when you reach a new all time user high in your integration? Do you like to see the impact on the installations when Frenck mentions your efforts in the release notes?

Wait no more! With this brand spanking new integration you can integrate home assistant analytics into home assistant. Well, you can even track home assistant analytics usage in home assistant analytics. If that doesn't sound good, I don't know what does.

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

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
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format 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:

Copy link
Contributor

@Bre77 Bre77 left a comment

Choose a reason for hiding this comment

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

Cant wait

Copy link
Contributor

@lellky lellky left a comment

Choose a reason for hiding this comment

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

This looks like a really useful thing!

Copy link
Contributor

@mkmer mkmer left a comment

Choose a reason for hiding this comment

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

Just a few comments from some of my recent work.
Looks GREAT!

step_id="user",
data_schema=vol.Schema(
{
vol.Required(CONF_TRACKED_INTEGRATIONS): SelectSelector(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add an option flow so the user can change the tracked integrations?

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do in a follow-up

Copy link
Contributor

@autinerd autinerd left a comment

Choose a reason for hiding this comment

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

Looks good for me, just the single thing :)

@joostlek joostlek changed the title Add Homeassistant Analytics integration Add Homeassistant Analytics Insights integration Jan 18, 2024
@joostlek joostlek marked this pull request as ready for review January 18, 2024 14:33
@home-assistant home-assistant bot marked this pull request as draft January 18, 2024 15:34
@joostlek joostlek marked this pull request as ready for review January 19, 2024 09:42
@home-assistant home-assistant bot marked this pull request as draft January 22, 2024 13:11
@joostlek joostlek marked this pull request as ready for review January 22, 2024 13:36
Copy link
Contributor

@edenhaus edenhaus left a comment

Choose a reason for hiding this comment

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

Thanks @joostlek 👍

@joostlek joostlek merged commit d9f1450 into home-assistant:dev Jan 23, 2024
53 checks passed
@joostlek joostlek deleted the homeassistant-analytics branch January 23, 2024 09:32
catsmanac pushed a commit to catsmanac/ha-core-dev that referenced this pull request Jan 23, 2024
* Add Homeassistant Analytics integration

* Add Homeassistant Analytics integration

* Add Homeassistant Analytics integration

* Fix feedback

* Fix test

* Update conftest.py

* Add some testcases

* Make code clear

* log exception

* Bump python-homeassistant-analytics to 0.2.1

* Bump python-homeassistant-analytics to 0.3.0

* Change domain to homeassistant_analytics_consumer

* Add integration name to config flow selector

* Update homeassistant/components/homeassistant_analytics_consumer/manifest.json

Co-authored-by: Sid <[email protected]>

* Fix hassfest

* Apply suggestions from code review

Co-authored-by: Robert Resch <[email protected]>

* Bump python-homeassistant-analytics to 0.4.0

* Rename to Home Assistant Analytics Insights

* Update homeassistant/components/analytics_insights/config_flow.py

Co-authored-by: Robert Resch <[email protected]>

* Update homeassistant/components/analytics_insights/manifest.json

Co-authored-by: Robert Resch <[email protected]>

* Rename to Home Assistant Analytics Insights

* add test

* Fallback to 0 when there is no data found

* Allow to select any integration

* Fix tests

* Fix tests

* Update tests/components/analytics_insights/conftest.py

Co-authored-by: Robert Resch <[email protected]>

* Update tests/components/analytics_insights/test_sensor.py

Co-authored-by: Robert Resch <[email protected]>

* Fix format

* Fix tests

---------

Co-authored-by: Sid <[email protected]>
Co-authored-by: Robert Resch <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 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.

8 participants