light: - platform: rflink devices: newkaku_013242b6_2: name: Piano-lamp type: switchable newkaku_013242b5_2: name: Piano-lamp REPEATER type: switchable sensor: - platform: sql db_url: mysql://hassio:hassiopassword@192.168.1.110/RemoteRxLog queries: - name: Piano-lamp repeater status query: "SELECT IF(onOff>0,'on','off') AS status FROM RemoteRxLog.nexaLog where rxTx='R' and remote_id = '20071094' and button='2' order by ts desc LIMIT 1;" column: 'status' input_boolean: piano_light_wanted_state: name: Piano-lamp, wanted state icon: mdi:lightbulb