Skip to content

Do not create a number LED brightness entity for Xiaomi Miio devices that do not support it#62819

Merged
balloob merged 3 commits into
home-assistant:devfrom
bieniu:xiaomi_miio/led_brightness_fix
Jan 4, 2022
Merged

Do not create a number LED brightness entity for Xiaomi Miio devices that do not support it#62819
balloob merged 3 commits into
home-assistant:devfrom
bieniu:xiaomi_miio/led_brightness_fix

Conversation

@bieniu
Copy link
Copy Markdown
Member

@bieniu bieniu commented Dec 26, 2021

Breaking change

Proposed change

After #60134 number LED Brightness entity is created for models that don't support it. FEATURE_SET_LED_BRIGHTNESS uses the select platform for most of the models. With this change, mistaken created entities will be removed and number LED Brightness entity will be created only for ZA5 fan.

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
  • 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.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link
Copy Markdown

This pull request needs to be manually signed off by @home-assistant/core before it can get merged.
(message by ReviewEnforcer)

@probot-home-assistant
Copy link
Copy Markdown

Hey there @rytilahti, @syssi, @starkillerOG, mind taking a look at this pull request as it has been labeled with an integration (xiaomi_miio) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@bieniu bieniu added this to the 2021.12.8 milestone Jan 3, 2022
@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Jan 4, 2022
Comment thread homeassistant/components/xiaomi_miio/number.py Outdated
@balloob balloob merged commit 626ae7b into home-assistant:dev Jan 4, 2022
from dataclasses import dataclass

from homeassistant.components.number import NumberEntity, NumberEntityDescription
from homeassistant.components.number.const import DOMAIN as PLATFORM_DOMAIN
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

you can import this from homeassistant.components.number directly. also namei t NUMBER_DOMAIN

balloob added a commit that referenced this pull request Jan 4, 2022
…that do not support it (#62819)

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
@balloob balloob mentioned this pull request Jan 4, 2022
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 5, 2022
@bieniu bieniu deleted the xiaomi_miio/led_brightness_fix branch November 28, 2022 21:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix by-code-owner cherry-picked cla-signed integration: xiaomi_miio small-pr PRs with less than 30 lines. smash Indicator this PR is close to finish for merging or closing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants