Change the icon of an input_boolean according to status

Dear, I would like the help of the gentlemen to find a way to change the icon dynamically of an input_boolean. I know how to change through custom … But I want to change it as it is on or off. I know the switches can do this function … but I wanted to keep the input. Does anyone have a way?

configuration.yaml

    sonoff_switch_1:
    name: Luz Entrada 
    initial: off
sonoff_switch_2:
    name: Luz Principal
    initial: off
sonoff_switch_3:
    name: Luz Jantar
    initial: off
sonoff_switch_4:
    name: Luz Home
    initial: off
sonoff_switch_5:
    name: Luz Piscina
    initial: off
sonoff_switch_6:   
    name: Cafeteira
    initial: off
ligar_tv:
    name: TV Sala
    initial: off
sonoff_switch_7:
    name: Bomba dagua
    initial: off
sonoff_switch_8:
    name: Entrada Externa
    initial: off`