Add device classes to switch configuration entities?
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- embedded-iot
Línea de trabajo
Start in zha/application/platforms/switch.py, which holds the Switch, BinaryOutputSwitch, SwitchGroup and ConfigurableAttributeSwitch classes. Check how ConfigurableAttributeSwitch.init takes its arguments, since it does not accept a device_class from v2 quirks. Decide which classes should expose Home Assistant's outlet or switch device classes, and wire them through. Done when the switch entities report a device class, quirks can set one, and the existing switch tests still pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Related to "We should also take a look at if this was missed in other platforms" question raised by @TheJulianJES in similar issue-> https://github.com/zigpy/zha/issues/302
It does not look like the switch platform reference device class anywhere either for any of the switch configuration entities provided in ZHA.
That covers the Switch on/off entity, BinaryOutputSwitch, SwitchGroup, and all the ConfigurableAttributeSwitch config entities (child lock, LED disable, window detection, and so on).
Home Assistant's switch platform supports at least outlet and switch, and smart plugs and wall outlets are the obvious case for outlet.
Unlike number, ConfigurableAttributeSwitch.init also doesn't accept a device_class from v2 quirks, so quirks can't set one either.
PS: Valve only has a base class but is another platform where it would also be useful to have device classes for as there are water valves, gas valves, etc.:
- Lenguaje dominante
- Python
- Estrellas
- 96
- Forks
- 84
- Merge medio
- 3 d 1 h
- PR fusionados (30 d)
- 13
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de zigpy/zha
-
Analog output numbers and analog input sensors show eleven BACnet engineering units as a different unitPosiblemente ocupada @zigpy-review-bot la tomó hace 2 días. Abiertobot: code audit
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
device specific quirks
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
zigpy/zha#907 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
entities
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
zigpy/zha#855 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
quirks
Dificultad 3/5 Medio día Aptitud para principiantes 58/100
zigpy/zha#1072 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Issues similares
-
pydanty:is-working
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
pydantic/pydantic-ai#14472 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
patrickballard/wheelgap#728 ·
-
bug good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
choras-org/simulation-backend#58 ·
Los mantenedores suelen responder en 1 día
-
backend part-1-modeling testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100