Try using this card yaml for the slider switches:
type: entities
entities:
- entity: switch.sofar_auto_saver_mode
name: Saver / Auto Mode
icon: mdi:battery-sync-outline
- entity: switch.sofar_standby_mode
icon: mdi:power
name: Stand-by
- entity: switch.sofar_charge_mode_2000
name: Chg 2000w
icon: mdi:ev-station
- entity: switch.sofar_charge_mode_2500
name: Chg 2500w
icon: mdi:ev-station
- entity: switch.sofar_charge_mode_3000
name: Chg 3000w
icon: mdi:ev-station
show_header_toggle: false
state_color: true
title: Sofar Inverter Control