Serial binding, REGEX, SWITCH item not changed

i have a problem with serial binding and regex. The Switch state in BASICUI does not change when item changing from ON to OFF or vice versa.
The incoming string in serial port look like -100;12100;ON;ON
I run OH 2.5 M1 build with Zulu Java package
My items is:

Number   UPS_Current     "Ток АКБ [%d]"                 { serial="/dev/ttyS0@19200,REGEX(^(-?\\d{1,5}))" ,autoupdate="true"} 
Number   UPS_Voltage     "Напряжкение АКБ  [%d]"         { serial="/dev/ttyS0@19200,REGEX(;(\\d{1,5});)" ,autoupdate="true"}   
Switch   Main_Power_220      "Сеть 220V [%s]"                 { serial="/dev/ttyS0@19200,REGEX(.*;(\\D{2,3});)" ,autoupdate="true"} 

My openhab.log:

2019-12-25 14:02:38.759 [DEBUG] [.serial.internal.RegexPatternMatcher] - about to transform '-9;12888;ON;ON
' by the function '^(-?\d{1,5})'
2019-12-25 14:02:38.786 [DEBUG] [.serial.internal.RegexPatternMatcher] - about to transform '-9;12888;ON;ON
' by the function '.*;(\D{2,3});'
2019-12-25 14:02:38.813 [DEBUG] [.serial.internal.RegexPatternMatcher] - about to transform '-9;12888;ON;ON
' by the function ';(\d{1,5});'
2019-12-25 14:02:40.247 [DEBUG] [binding.serial.internal.SerialDevice] - Received message '-3;12888;ON;ON
' on serial port /dev/ttyS0
2019-12-25 14:02:40.257 [DEBUG] [.serial.internal.RegexPatternMatcher] - about to transform '-3;12888;ON;ON
' by the function '^(-?\d{1,5})'
2019-12-25 14:02:40.280 [DEBUG] [.serial.internal.RegexPatternMatcher] - about to transform '-3;12888;ON;ON
' by the function '.*;(\D{2,3});'
2019-12-25 14:02:40.318 [DEBUG] [.serial.internal.RegexPatternMatcher] - about to transform '-3;12888;ON;ON
' by the function ';(\d{1,5});'
2019-12-25 14:02:41.745 [DEBUG] [binding.serial.internal.SerialDevice] - Received message '-7;12888;ON;ON
' on serial port /dev/ttyS0
2019-12-25 14:02:41.752 [DEBUG] [.serial.internal.RegexPatternMatcher] - about to transform '-7;12888;ON;ON
' by the function '^(-?\d{1,5})'
2019-12-25 14:02:41.775 [DEBUG] [.serial.internal.RegexPatternMatcher] - about to transform '-7;12888;ON;ON
' by the function '.*;(\D{2,3});'
2019-12-25 14:02:41.808 [DEBUG] [.serial.internal.RegexPatternMatcher] - about to transform '-7;12888;ON;ON
' by the function ';(\d{1,5});'

event.log

2019-12-25 14:02:02.828 [thome.event.ItemStateEvent] - Main_Power_220 updated to ON
2019-12-25 14:02:02.851 [thome.event.ItemStateEvent] - UPS_Voltage updated to 12888
2019-12-25 14:02:04.265 [thome.event.ItemStateEvent] - UPS_Current updated to -7
2019-12-25 14:02:04.299 [thome.event.ItemStateEvent] - Main_Power_220 updated to ON
2019-12-25 14:02:04.340 [thome.event.ItemStateEvent] - UPS_Voltage updated to 12888
2019-12-25 14:02:05.787 [thome.event.ItemStateEvent] - UPS_Current updated to -9
2019-12-25 14:02:05.843 [vent.ItemStateChangedEvent] - UPS_Current changed from -7 to -9
2019-12-25 14:02:05.880 [thome.event.ItemStateEvent] - Main_Power_220 updated to ON
2019-12-25 14:02:05.907 [thome.event.ItemStateEvent] - UPS_Voltage updated to 12888
2019-12-25 14:02:07.318 [thome.event.ItemStateEvent] - UPS_Current updated to -4
2019-12-25 14:02:07.352 [vent.ItemStateChangedEvent] - UPS_Current changed from -9 to -4
2019-12-25 14:02:07.387 [thome.event.ItemStateEvent] - Main_Power_220 updated to ON
2019-12-25 14:02:07.407 [thome.event.ItemStateEvent] - UPS_Voltage updated to 12888

this is sitemap:

Group item=Hardware label="UPS" icon="heating" {
			Text item=UPS_Current
			Text item=UPS_Voltage
	        Switch  item=Main_Power_220   valuecolor=[Main_Power_220=="ON"="green",Main_Power_220=="OFF"="red"]
				}	

UPS_Current and UPS_Voltage displayed fine. But Main_Power_220V does not change depending on item state (ON or OFF). When i turned off power item Main_Power_220V not changed from ON to OFF. Why?

2019-12-24 20:01:17.270 [thome.event.ItemStateEvent] - Main_Power_220 updated to ON
2019-12-24 20:01:17.293 [thome.event.ItemStateEvent] - UPS_Voltage updated to 12852
2019-12-24 20:01:17.320 [vent.ItemStateChangedEvent] - UPS_Current changed from -30 to -37
2019-12-24 20:01:18.749 [thome.event.ItemStateEvent] - UPS_Current updated to 6375
2019-12-24 20:01:18.792 [vent.ItemStateChangedEvent] - UPS_Current changed from -37 to 6375
*2019-12-24 20:01:18.814 [thome.event.ItemStateEvent] - Main_Power_220 updated to OFF*

Your openhab.log excerpt doesn’t show any messages received with a value of ‘OFF’

here is part of log with changing ON-OFF
openhab.log

019-12-25 19:16:26.571 [DEBUG] [binding.serial.internal.SerialDevice] - Received message '1;12888;ON;ON
' on serial port /dev/ttyS0
2019-12-25 19:16:26.577 [DEBUG] [.serial.internal.RegexPatternMatcher] - about to transform '1;12888;ON;ON
' by the function '^(-?\d{1,5})'
2019-12-25 19:16:26.597 [DEBUG] [.serial.internal.RegexPatternMatcher] - about to transform '1;12888;ON;ON
' by the function '.*;(\D{2,3});'
2019-12-25 19:16:26.636 [DEBUG] [.serial.internal.RegexPatternMatcher] - about to transform '1;12888;ON;ON
' by the function ';(\d{1,5});'
2019-12-25 19:16:28.072 [DEBUG] [binding.serial.internal.SerialDevice] - Received message '6444;12572;OFF;ON
' on serial port /dev/ttyS0
2019-12-25 19:16:28.079 [DEBUG] [.serial.internal.RegexPatternMatcher] - about to transform '6444;12572;OFF;ON
' by the function '^(-?\d{1,5})'
2019-12-25 19:16:28.105 [DEBUG] [.serial.internal.RegexPatternMatcher] - about to transform '6444;12572;OFF;ON
' by the function '.*;(\D{2,3});'
2019-12-25 19:16:28.151 [DEBUG] [.serial.internal.RegexPatternMatcher] - about to transform '6444;12572;OFF;ON
' by the function ';(\d{1,5});'
2019-12-25 19:16:29.574 [DEBUG] [binding.serial.internal.SerialDevice] - Received message '6440;12540;OFF;ON

and this is part of events.log

2019-12-25 19:16:26.588 [thome.event.ItemStateEvent] - UPS_Current updated to 1
2019-12-25 19:16:26.616 [vent.ItemStateChangedEvent] - UPS_Current changed from -1 to 1
2019-12-25 19:16:26.631 [thome.event.ItemStateEvent] - Main_Power_220 updated to ON
2019-12-25 19:16:26.662 [thome.event.ItemStateEvent] - UPS_Voltage updated to 12888
2019-12-25 19:16:28.097 [thome.event.ItemStateEvent] - UPS_Current updated to 6444
2019-12-25 19:16:28.128 [vent.ItemStateChangedEvent] - UPS_Current changed from 1 to 6444
2019-12-25 19:16:28.155 [thome.event.ItemStateEvent] - Main_Power_220 updated to OFF
2019-12-25 19:16:28.177 [thome.event.ItemStateEvent] - UPS_Voltage updated to 12572
2019-12-25 19:16:28.202 [vent.ItemStateChangedEvent] - UPS_Voltage changed from 12888 to 12572
2019-12-25 19:16:29.591 [thome.event.ItemStateEvent] - UPS_Current updated to 6440
2019-12-25 19:16:29.627 [vent.ItemStateChangedEvent] - UPS_Current changed from 6444 to 6440
2019-12-25 19:16:29.653 [thome.event.ItemStateEvent] - Main_Power_220 updated to OFF
2019-12-25 19:16:29.680 [thome.event.ItemStateEvent] - UPS_Voltage updated to 12540
2019-12-25 19:16:29.712 [vent.ItemStateChangedEvent] - UPS_Voltage changed from 12572 to 12540
2019-12-25 19:16:31.096 [thome.event.ItemStateEvent] - UPS_Current updated to 6325
2019-12-25 19:16:31.131 [vent.ItemStateChangedEvent] - UPS_Current changed from 6440 to 6325
2019-12-25 19:16:31.151 [thome.event.ItemStateEvent] - Main_Power_220 updated to OFF

i suppoused the next string must be CHANGED from ON to OFF but in log i see updated.
2019-12-25 19:16:26.631 [thome.event.ItemStateEvent] - Main_Power_220 updated to ON

2019-12-25 19:16:28.155 [thome.event.ItemStateEvent] - Main_Power_220 updated to OFF

I think if you make your Main_Power_220 into a String type Item, you’ll be able to see what is happening better. I think your serial configuration sends string “ON” which the Switch type ignores.

Yes. I have changed item to String Type and sitemap to text and state displayed fine.
This is part of log:

2019-12-25 20:07:11.233 [thome.event.ItemStateEvent] - Main_Power_220 updated to ON
2019-12-25 20:07:11.250 [thome.event.ItemStateEvent] - UPS_Voltage updated to 12852
2019-12-25 20:07:11.271 [vent.ItemStateChangedEvent] - UPS_Current changed from -37 to -38
2019-12-25 20:07:12.698 [thome.event.ItemStateEvent] - UPS_Current updated to 6120
2019-12-25 20:07:12.750 [thome.event.ItemStateEvent] - Main_Power_220 updated to OFF

This item does not changed only updated. I need changed to run some rules. The serial device send this data very often (1 per sec) and run rule every second on update state is too expencive.