HASS-sonoff-ewelink icon indicating copy to clipboard operation
HASS-sonoff-ewelink copied to clipboard

Warning: SwitchDevice is deprecated, modify SonoffSwitch to extend SwitchEntity

Open kaosmagix opened this issue 4 years ago • 9 comments

Home Assistant 0.110.0b2

SwitchDevice is deprecated, modify SonoffSwitch to extend SwitchEntity SwitchDevice is deprecated, modify SonoffDebugSwitch to extend SwitchEntity

This warning appears in the logs when starting HA (also for a few other custom components).

(No idea what it entails but as it is a deprecation warning I thought it would be useful to know)

Thanks for this great component!

kaosmagix avatar May 15 '20 18:05 kaosmagix

There are these warnings too:

BinarySensorDevice is deprecated, modify SonoffSensorRF to extend BinarySensorEntity Light is deprecated, modify SonoffLight to extend LightEntity

mgiako avatar May 16 '20 09:05 mgiako

Same here since the last version

lbouriez avatar May 20 '20 14:05 lbouriez

Same in 0.110, 3 warns:

Light is deprecated, modify SonoffLight to extend LightEntity

BinarySensorDevice is deprecated, modify SonoffSensorRF to extend BinarySensorEntity

SwitchDevice is deprecated, modify SonoffSwitch to extend SwitchEntity SwitchDevice is deprecated, modify SonoffDebugSwitch to extend SwitchEntity

Sergiio avatar May 20 '20 15:05 Sergiio

Seems easy fix by changing the few line.. probably author will edit when free. Nothing major to worry about.

tyjtyj avatar May 28 '20 13:05 tyjtyj

Same here

"SwitchDevice is deprecated, modify SonoffSwitch to extend SwitchEntity SwitchDevice is deprecated, modify SonoffDebugSwitch to extend SwitchEntity"

error420 avatar Jul 12 '20 19:07 error420

Same Here Logger: homeassistant.components.switch Source: components/switch/init.py:123 Integration: Interruptor (documentation, issues) First occurred: 12:15:08 (2 occurrences) Last logged: 12:15:08

SwitchDevice is deprecated, modify SonoffSwitch to extend SwitchEntity SwitchDevice is deprecated, modify SonoffDebugSwitch to extend SwitchEntity

DavidFFerreira avatar Aug 06 '20 11:08 DavidFFerreira

Started getting the below with 0.117.X versions, any idea on a fix?

2020-11-11 10:37:11 WARNING (MainThread) [homeassistant.components.switch] SwitchDevice is deprecated, modify SonoffSwitch to extend SwitchEntity
2020-11-11 10:37:11 WARNING (MainThread) [homeassistant.components.switch] SwitchDevice is deprecated, modify SonoffDebugSwitch to extend SwitchEntity
2020-11-11 10:37:11 WARNING (MainThread) [homeassistant.components.binary_sensor] BinarySensorDevice is deprecated, modify SonoffSensorRF to extend BinarySensorEntity 

silviudc avatar Nov 11 '20 10:11 silviudc

Pls Is there any fix for this? I have the same issue. Thanks

montyha66 avatar Jun 09 '21 09:06 montyha66

Pls Is there any fix for this? I have the same issue. Thanks

Consider move to https://github.com/AlexxIT/SonoffLAN

tyjtyj avatar Jun 09 '21 09:06 tyjtyj