I’m trying to use the switch to enable or disable my inverter’s antireflux. I wrote this code but it doesn’t work, where am I going wrong?
modbus:
- name: hub2
type: tcp
host: 192.168.1.52
port: 502
switches:
- name: Anti Reflux On/Off
slave: 1
address: 0x1023
write_type: holding
command_on: 1
command_off: 0
verify:
input_type: holding
address: 0x1023
state_on: 1
state_off: 0
U.Dicke
(Ulrich Dicke)
3
Hi, do you ha a solution already? I have a simelar problem
# Modbus config and sensor to read the modbus registers from the Amtron Xtra/Premium in one go
modbus:
- name: Amtron
type: tcp
host: 192.168.178.24
port: 502
# retry_on_empty: true
# retries: 1
timeout: 10
delay: 1
sensors:
# Holding register (R/W)
- name: "Amtron aktuelles Ladestrom Limit"
unique_id: amtron_current_limitation
slave: 255
address: 0x0400
# count: 1
data_type: uint16
input_type: holding
unit_of_measurement: A
device_class: current
- name: "Amtron Change Charge State"
unique_id: amtron_change_charge_state
slave: 255
address: 0x0401
# count: 1
data_type: uint16
input_type: holding
- name: "Amtron aktuelle Leistung"
unique_id: amtron_aktuelle_Leistung
slave: 255
address: 0x030F
data_type: uint16
unit_of_measurement: W
device_class: power
input_type: input
- name: "Amtron aktuell geladene Energie"
unique_id: amtron_aktuell_geladene_Energie
slave: 255
address: 0x030D
data_type: uint16
unit_of_measurement: Wh
device_class: energy
input_type: input
input_number:
ladestrom_einstellung:
name: "Ladestrom Einstellung"
initial: 6
min: 6
max: 16
step: 1
switch:
- platform: modbus
scan_interval: 5
registers:
- name: "Modbus Charge Pause"
hub: Amtron
unit_of_measurement: ""
register: 41026
data_type: uint16
command_on: 1
command_off: 0
icon: mdi:pause
- name: "Modbus Charge Continue"
hub: Amtron
unit_of_measurement: ""
register: 41026
data_type: uint16
command_on: 2
command_off: 0
icon: mdi:play
- name: "Modbus Charge Terminate"
hub: Amtron
unit_of_measurement: ""
register: 41026
data_type: uint16
command_on: 3
command_off: 0
icon: mdi:stop
- name: "Modbus Charge Start"
hub: Amtron
unit_of_measurement: ""
register: 41026
data_type: uint16
command_on: 4
everything is working fine, but the switsches don’t appear anywhere
Any idea?