Tried to add a new Driver following document but says it can't load the .py #364
Unanswered
johnw230873
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Welcome to create a PR when you finish your driver. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
I have a Dual-Network Secuirty Alarm.
Looking at the output I know that the status of "master_mode" is the value I need to change.
Not set
.....
"status": [
{
"code": "master_mode",
"value": "disarmed"
},
......
Set
.....
"status": [
{
"code": "master_mode",
"value": "arm"
},
.....
Know this I first thought I would use the switch.py adding the TUYA_SUPPORT_TYPE of mal and then add an extra dp_code.
Reading more of the wiki page "How to Develop a New Driver" I thought I would add an extra PY call alarm.py and add the extra code into that file. From reading the file all I expected I needed to do was add a "alarm.py" in const.py in the TUYA_SUPPORT_HA_TYPE hence
TUYA_SUPPORT_HA_TYPE = [
"switch",
"fan",
"cover",
"climate",
"light",
"sensor",
"binary_sensor",
"humidifier",
"number",
"vacuum",
"alarm"
]
but when I do this I get an error when Home Assistant is reloaded saying it can't local alarm.py. I have checked the logs and they don't indicate why.
I also noticed that the py of alarm_control_panel.py was in the TUYA_SUPPORT_HA_TYPE, does this get loaded.
I would love to work with someone to get this going but stuck as the wiki isn't working as expected.
So current issue
why can't I create an alarm.py
is alarm_control_panel.py getting loaded even though it isn't in TUYA_SUPPORT_HA_TYPE
If I know there are only 2 modes for the alarm should I be using switch.py
thanks
Beta Was this translation helpful? Give feedback.
All reactions