From 1f4fa379bb447c183d52cb5d042e07eba546e57d Mon Sep 17 00:00:00 2001 From: miki Date: Tue, 2 Dec 2025 10:37:21 +0100 Subject: [PATCH] =?UTF-8?q?Nahr=C3=A1t=20soubory=20do=20=E2=80=9Ecommon?= =?UTF-8?q?=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/pwm_pin_output.yaml | 8 ++++++++ common/pwm_set_no_nc.yaml | 11 +++++++++++ common/pwm_to_group.yaml | 16 ++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 common/pwm_pin_output.yaml create mode 100644 common/pwm_set_no_nc.yaml create mode 100644 common/pwm_to_group.yaml 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