Просмотр исходного кода

Smart watering device: remove unneeded mappings

Including mappings of true to ON and false to OFF is just confusing to anyone using this as a template for a new device, as yaml maps these to the same Python True and False values.  The values do not need to be mapped, and are not needed explicitly for a list of possible options, as a switch has fixed options.
Jason Rumney 2 лет назад
Родитель
Сommit
6211a3525e
1 измененных файлов с 0 добавлено и 2 удалено
  1. 0 2
      custom_components/tuya_local/devices/smart_watering_device.yaml

+ 0 - 2
custom_components/tuya_local/devices/smart_watering_device.yaml

@@ -11,10 +11,8 @@ primary_entity:
       mapping:
         - dps_val: true
           icon: mdi:water-pump
-          value: ON
         - dps_val: false
           icon: mdi:water-pump-off
-          value: OFF
     - id: 48
       type: string
       optional: true