diff --git a/common/pwm_pin_output.yaml b/common/pwm_pin_output.yaml new file mode 100644 index 0000000..22ca71c --- /dev/null +++ b/common/pwm_pin_output.yaml @@ -0,0 +1,8 @@ +output: + - platform: modbus_controller + id: ${id} + modbus_controller_id: slave_device + register_type: holding + address: ${address} + write_lambda: |- + return (uint16_t)(x * 100.0); \ No newline at end of file diff --git a/common/pwm_set_no_nc.yaml b/common/pwm_set_no_nc.yaml new file mode 100644 index 0000000..d2b4309 --- /dev/null +++ b/common/pwm_set_no_nc.yaml @@ -0,0 +1,11 @@ +switch: + - platform: modbus_controller + modbus_controller_id: slave_device + name: "PWM${id_name} type (NO)" + icon: mdi:select-inverse + web_server: + sorting_group_id: sorting_group_pwm_config + register_type: holding + address: ${address} + write_lambda: |- + return x ? 1 : 0; \ No newline at end of file diff --git a/common/pwm_to_group.yaml b/common/pwm_to_group.yaml new file mode 100644 index 0000000..760c720 --- /dev/null +++ b/common/pwm_to_group.yaml @@ -0,0 +1,16 @@ +select: + - platform: modbus_controller + modbus_controller_id: slave_device + name: "PWM${id} group" + icon: mdi:form-select + web_server: + sorting_group_id: sorting_group_pwm_config + id: pwm${id}_group + address: ${address} + value_type: U_WORD + optionsmap: + "none" : 0 + "Group 1" : 1 + "Group 2" : 2 + "Group 3" : 3 + "Group 4" : 4 \ No newline at end of file