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

Samples, Resailers and updates #9

Merged
merged 68 commits into from
Feb 7, 2025
Merged

Samples, Resailers and updates #9

merged 68 commits into from
Feb 7, 2025

Conversation

Delmael
Copy link
Collaborator

@Delmael Delmael commented Feb 6, 2025

Hello hello 😄

As I have resumed the work on the smartbox package, I was able to update the hass component.
You can see here the changelog for the pypi package : https://github.com/Delmael/smartbox/releases/tag/v2.1.0-beta.2

What's Changed

  • Every interaction are now by default async and we use the hass-websession. This is an unvisible update but needed for beeing more compliant with hass requirements.
  • Resailers :
    • I've simplified the config flow form. You do not need anymore to know the api name and the basic auth. I get this information from the smartbox package. If the resailer is not in the list we will have to update the smartbox package with a new release. Start from now, you only need email and password for configuration flow.
    • When you are on the device interface, you can directly go to the configuration web page of this device
    • We also can, with an option config flow, display the logo of the resailers instead of hass logo for entities
  • Samples : the smartbox API give you the consumption and temperature history of the device through samples.
    • There is a new power sensor which get this information. The energy dashboard is now correctly working !
    • The first time the config entry is set, i try to get the last 3 years of consumption and inject it in statistics. Next after, every hour i can the last 24 hours of consumption and update it. You can reset/active/off this features throw the options config.
  • Entities : I've marked some of them as configuration or diagnostic entities.

⚠️ This integration required Home assistant >= 2015 and python 3.13 ⚠️

@Delmael Delmael changed the title Samples Samples, Resailers and updates Feb 6, 2025
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 99.61089% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.27%. Comparing base (ded81c7) to head (db9ecdd).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
custom_components/smartbox/entity.py 96.77% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #9      +/-   ##
==========================================
+ Coverage   96.44%   99.27%   +2.82%     
==========================================
  Files           9       10       +1     
  Lines         788      828      +40     
==========================================
+ Hits          760      822      +62     
+ Misses         28        6      -22     
Files with missing lines Coverage Δ
custom_components/smartbox/__init__.py 98.27% <100.00%> (+13.09%) ⬆️
custom_components/smartbox/climate.py 97.11% <100.00%> (-0.28%) ⬇️
custom_components/smartbox/config_flow.py 100.00% <100.00%> (+18.84%) ⬆️
custom_components/smartbox/const.py 100.00% <100.00%> (ø)
custom_components/smartbox/model.py 100.00% <100.00%> (+1.09%) ⬆️
custom_components/smartbox/number.py 100.00% <100.00%> (ø)
custom_components/smartbox/sensor.py 99.27% <100.00%> (+0.07%) ⬆️
custom_components/smartbox/switch.py 100.00% <100.00%> (ø)
custom_components/smartbox/types.py 100.00% <100.00%> (ø)
custom_components/smartbox/entity.py 96.77% <96.77%> (ø)

@Delmael Delmael marked this pull request as draft February 6, 2025 17:41
@Delmael Delmael marked this pull request as ready for review February 6, 2025 17:56
@ajtudela
Copy link
Owner

ajtudela commented Feb 6, 2025

Awesome impovmentes

As I have resumed the work on the smartbox package, I was able to update the hass component. You can see here the changelog for the pypi package : https://github.com/Delmael/smartbox/releases/tag/v2.1.0-beta.2
Please also make a PR with these changes to the main repo to have one with the main development.

  • I've simplified the config flow form. You do not need anymore to know the api name and the basic auth. I get this information from the smartbox package. If the resailer is not in the list we will have to update the smartbox package with a new release. Start from now, you only need email and password for configuration flow.
    That's a big improvment!
  • There is a new power sensor which get this information. The energy dashboard is now correctly working !
    How does it work? Is it reset every 24 hours so that the energy dashboard shows the correct information?

I'll test it tomorrow, but LGTM.

P.D.: I need to give you maintainer permissions for the repo :)

@Delmael
Copy link
Collaborator Author

Delmael commented Feb 7, 2025

Awesome impovmentes

As I have resumed the work on the smartbox package, I was able to update the hass component. You can see here the changelog for the pypi package : https://github.com/Delmael/smartbox/releases/tag/v2.1.0-beta.2
Please also make a PR with these changes to the main repo to have one with the main development.

  • I've simplified the config flow form. You do not need anymore to know the api name and the basic auth. I get this information from the smartbox package. If the resailer is not in the list we will have to update the smartbox package with a new release. Start from now, you only need email and password for configuration flow.
    That's a big improvment!
  • There is a new power sensor which get this information. The energy dashboard is now correctly working !
    How does it work? Is it reset every 24 hours so that the energy dashboard shows the correct information?

I'll test it tomorrow, but LGTM.

P.D.: I need to give you maintainer permissions for the repo :)

I can make a PR to update atjudela/smartbox but I have configured all the pypi, links, issue templates and other stuff with my Delmael/smartbox repo.....

Regarding the consumption history, I'v added into the README a section to explain a little bit how it works. It's maybe not enough so let me know what I need to add 😄

I've removed the ignore brands information into the hacs workflow as we now have a logo.

@ajtudela
Copy link
Owner

ajtudela commented Feb 7, 2025

I can make a PR to update atjudela/smartbox but I have configured all the pypi, links, issue templates and other stuff with my Delmael/smartbox repo.....

That would be weird, having the repos under differents namespaces but... OK.

@ajtudela ajtudela merged commit 1dc9ac7 into ajtudela:main Feb 7, 2025
5 checks passed
@Delmael
Copy link
Collaborator Author

Delmael commented Feb 7, 2025

I can make a PR to update atjudela/smartbox but I have configured all the pypi, links, issue templates and other stuff with my Delmael/smartbox repo.....

That would be weird, having the repos under differents namespaces but... OK.

@ajtudela I can make all the modification and PR to merge into your atjudela/smartbox, but i will have to give me the maintainer role on your repo :)

@Delmael Delmael deleted the samples branch February 7, 2025 22:05
@ajtudela
Copy link
Owner

ajtudela commented Feb 7, 2025

@ajtudela I can make all the modification and PR to merge into your atjudela/smartbox, but i will have to give me the maintainer role on your repo :)

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants