Add configuration for PIR Motion Switch device (#4684)
* Add configuration for PIR Motion Switch device
This PR adds support for the Tuya MFA05 PIR Motion Switch
(product ID iii7gagtan21i2of).
The device exposes the following DPS via the local Tuya protocol (3.3):
- 1: Light relay switch (boolean)
- 103: Inching mode (string)
- 104: LED indicator (boolean)
- 106: Motion alarm (boolean)
Motion is represented by DP 106. DP 1 is the actual relay and can be
manually toggled; it may mirror motion depending on device settings,
but it is not the motion state.
DP 103 is a string-based inching mode value. The device reports opaque string values (e.g., "AQJY"), so it is exposed as a text entity rather than a select.
receives DPS 1, 103, 104, and 106 from the device.
Below is the DPS cache from the Tuya Local device debug output:
"1": true,
"103": "AQJY",
"104": true,
"106": true
The included YAML definition has been tested locally in Home Assistant
with Tuya Local and works reliably.
Let me know if anything needs adjustment.
* Move to correct location and use a unique filename
* Add configuration for Tuya MFA05 Motion Switch
Defines the Tuya MFA05 PIR Motion Wall Switch with its properties and entities.
Replaced old code I originally uploaded with what is working for me locally. I deleted the original file, but GitHub wouldn’t let me use the same name. I will try committing it with a 2 and then changing the name.
* Refactor comments and format in YAML file
Removing blank lines
* Delete custom_components/tuya_local/devices/mfa05_motionswitch.yaml
Delete old file with bad code
* Rename mfa05_motionswitch2.yaml to mfa05_motionswitch.yaml
Rename new file to original file name.
* Delete custom_components/tuya_local/devices/mfa05_motionswitch.yaml
Delete file that will be replaced be one with a better name and incorpating the requested changes.
* Add files via upload
Upload of yaml file from HA
* Add configuration for MOES PIR Wall Switch
* Update Motion Alarm entity class definition
Changed 'device_class' to 'class' for Motion Alarm entity.
* fix (moes_pir_wall_switch): naming changes, categorization
Updated naming to follow HA naming conventions, other similar devices, and reuse of translations where possible
- added category for configuration entities
PR #4684
---------
Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>