Samsung Smart TV on/off in Hass

I can turn on my Samsung smart tv with smaung tv component in Hass, but turning it back on i use hdmi-cec. How can i use hdmi-cec with samsung tv component.

06

55

CEC Scanner LOG when tv is ON.

starting version 3.2.2
opening a connection to the CEC adapter...
requesting CEC bus information ...
CEC bus information
===================
device #0: TV
address:       0.0.0.0
active source: yes
vendor:        Samsung
osd string:    TV
CEC version:   1.4
power status:  on
language:      eng
device #1: Recorder 1
address:       1.0.0.0
active source: no
vendor:        Pulse Eight
osd string:    CECTester
CEC version:   1.4
power status:  on
language:      eng
device #5: Audio
address:       3.0.0.0
active source: no
vendor:        Onkyo
osd string:    TX-NR636  
CEC version:   1.4
power status:  standby
language:      ???
currently active source: TV (0)
/run.sh: line 4:    13 Done                    echo scan
        14 Segmentation fault      (core dumped) | cec-client -s -d 1

In order not to produce a theme to write here. Last week at me in HA the smart TV Samsung 40d6100 ceased to be operated. The permanently icon shows that the Samsung media player controls to the off position.