- platform: sql db_url: mysql://hassio:hassiopassword@192.168.1.110/RemoteRxLog queries: - name: Lux outside the garage query: "SELECT CAST(AVG(data) AS signed) as data FROM (SELECT data FROM RemoteRxLog.rawTemp WHERE type = 'lux' and data < '65535' ORDER BY id DESC LIMIT 3) items;" column: 'data' unit_of_measurement: Lux - name: Outside temperature query: "SELECT temp1 FROM RemoteRxLog.temp order by ts desc LIMIT 1;" column: 'temp1' unit_of_measurement: C - 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' - name: Exterior light status query: "SELECT IF(onOff>0,'on','off') AS status FROM RemoteRxLog.nexaLog where rxTx='R' and remote_id = '20071094' and button='1' order by ts desc LIMIT 1;" column: 'status' - platform: mqtt name: Temperatur Hällby state_topic: "sensor/outside/temperature" unit_of_measurement: "°C"