diff --git a/homeassistant/components/climate/__init__.py b/homeassistant/components/climate/__init__.py index bf663fac365..43d98ad6bbd 100644 --- a/homeassistant/components/climate/__init__.py +++ b/homeassistant/components/climate/__init__.py @@ -339,9 +339,6 @@ class ClimateEntity(Entity, cached_properties=CACHED_PROPERTIES_WITH_ATTR_): def _report_turn_on_off(feature: str, method: str) -> None: """Log warning not implemented turn on/off feature.""" - module = type(self).__module__ - if module and "custom_components" not in module: - return report_issue = self._suggest_report_issue() if feature.startswith("TURN"): message = ( diff --git a/tests/components/climate/test_init.py b/tests/components/climate/test_init.py index f764ad77aa9..0e4e70796f0 100644 --- a/tests/components/climate/test_init.py +++ b/tests/components/climate/test_init.py @@ -684,65 +684,3 @@ async def test_no_warning_integration_has_migrated( " implements HVACMode(s): off, heat and therefore implicitly supports the off, heat methods" not in caplog.text ) - - -async def test_no_warning_on_core_integrations_for_on_off_feature_flags( - hass: HomeAssistant, caplog: pytest.LogCaptureFixture, config_flow_fixture: None -) -> None: - """Test we don't warn on core integration on new turn_on/off feature flags.""" - - class MockClimateEntityTest(MockClimateEntity): - """Mock Climate device.""" - - def turn_on(self) -> None: - """Turn on.""" - - def turn_off(self) -> None: - """Turn off.""" - - async def async_setup_entry_init( - hass: HomeAssistant, config_entry: ConfigEntry - ) -> bool: - """Set up test config entry.""" - await hass.config_entries.async_forward_entry_setups(config_entry, [DOMAIN]) - return True - - async def async_setup_entry_climate_platform( - hass: HomeAssistant, - config_entry: ConfigEntry, - async_add_entities: AddEntitiesCallback, - ) -> None: - """Set up test climate platform via config entry.""" - async_add_entities( - [MockClimateEntityTest(name="test", entity_id="climate.test")] - ) - - mock_integration( - hass, - MockModule( - "test", - async_setup_entry=async_setup_entry_init, - ), - built_in=False, - ) - mock_platform( - hass, - "test.climate", - MockPlatform(async_setup_entry=async_setup_entry_climate_platform), - ) - - with patch.object( - MockClimateEntityTest, "__module__", "homeassistant.components.test.climate" - ): - config_entry = MockConfigEntry(domain="test") - config_entry.add_to_hass(hass) - assert await hass.config_entries.async_setup(config_entry.entry_id) - await hass.async_block_till_done() - - state = hass.states.get("climate.test") - assert state is not None - - assert ( - "does not set ClimateEntityFeature.TURN_OFF but implements the turn_off method." - not in caplog.text - )