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

Added aliases to get Tasmota-branded Nous A1T to work. #1820

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

elemakil
Copy link
Contributor

I have a "Tasmota-branded" Nous A1T Smart Plug which isn't properly recognised by the powercalc autodiscovery. I've enabled debug logging and discovered the following printout:

2023-08-15 21:23:57.610 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.ender3v2: Auto discovered model (manufacturer=Tasmota, model=NOUS A1T)
2023-08-15 21:23:57.610 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.ender3v2: Model not found in library, skipping discovery

For reference, the "Information" page of my Nous A1T shows the following info:
image
image

The manufacturer is listed as "Tasmota" and the model as "NOUS A1T". In #1721, support for Nous A1T was added, but this refers to manufacturer "Nous" and model "A1T". Within this PR, I have therefore added the required aliases to the manufacturer alias list as well as the device alias list. I can confirm that my Nous A1T plug gets discovered by powercalc using these settings.

Note: I am not entirely sure that adding the manufacturer alias is a good idea since it'll map all devices that report as being manufactured by "Tasmota" onto the "Nous" manufacturer. I am open to alternative solutions.

    - New manufacturer alias from "Tasmota" to "Nous"
    - New device alias "NOUS A1T" to "A1T"
@sonarcloud
Copy link

sonarcloud bot commented Aug 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bramstroker
Copy link
Owner

Let's merge now, we can rework the manufacturer alias mechanism in the future to support 1 to many mapping in the future when needed.

@bramstroker bramstroker merged commit ade3958 into bramstroker:master Aug 16, 2023
9 checks passed
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