<template>
  <div class="l-grid--info">
    <sensor
      type="temperature"
      title="温度"
      color="#ff0000"
    />
    <sensor
      type="smoke"
      title="烟雾"
      color="#8400ff"
    />
    <sensor
      type="flooding"
      title="水浸"
    />
    <sensor
      type="light"
      title="光照"
      color="#ffa200"
    />
  </div>
</template>

<script>
import {
  startSensor,
  stopSensor
} from '@/views/device/detail/monitor'
import Sensor from './Sensor'

export default {
  name: 'Sensors',
  components: {
    Sensor
  },
  activated () {
    startSensor()
  },
  deactivated () {
    stopSensor()
  }
}
</script>
