import type { DemoConfig } from "../types";

export const demoEntitiesHome: DemoConfig["entities"] = () => [
  // The devices tile on the overview uses zone.home, which always exists in
  // a real installation.
  {
    entity_id: "zone.home",
    state: "1",
    attributes: {
      latitude: 52.3731339,
      longitude: 4.8903147,
      radius: 100,
      friendly_name: "Home",
      icon: "mdi:home",
    },
  },
  {
    entity_id: "light.living_room_floor_lamp",
    state: "on",
    area_id: "living_room",
    attributes: {
      min_color_temp_kelvin: 2000,
      max_color_temp_kelvin: 6535,
      supported_color_modes: ["color_temp", "xy"],
      color_mode: "color_temp",
      brightness: 178,
      color_temp_kelvin: 2583,
      icon: "mdi:floor-lamp",
      friendly_name: "Floor lamp",
      supported_features: 44,
    },
  },
  {
    entity_id: "light.living_room_spotlights",
    state: "on",
    area_id: "living_room",
    attributes: {
      supported_color_modes: ["brightness"],
      color_mode: "brightness",
      brightness: 126,
      icon: "mdi:ceiling-light-multiple",
      friendly_name: "Spotlights",
      supported_features: 32,
    },
  },
  {
    entity_id: "climate.living_room",
    state: "heat",
    area_id: "living_room",
    attributes: {
      hvac_modes: ["auto", "heat", "off"],
      min_temp: 7,
      max_temp: 35,
      current_temperature: 21.5,
      temperature: 21,
      friendly_name: "Thermostat",
      supported_features: 385,
    },
  },
  {
    entity_id: "cover.living_room_blinds",
    state: "open",
    area_id: "living_room",
    attributes: {
      current_position: 100,
      device_class: "blind",
      friendly_name: "Blinds",
      supported_features: 15,
    },
  },
  {
    entity_id: "binary_sensor.living_room_window",
    state: "off",
    area_id: "living_room",
    attributes: {
      device_class: "window",
      friendly_name: "Window",
    },
  },
  {
    entity_id: "media_player.living_room_speaker",
    state: "playing",
    area_id: "living_room",
    attributes: {
      device_class: "speaker",
      volume_level: 0.28,
      is_volume_muted: false,
      media_content_type: "music",
      media_duration: 300,
      media_position: 0,
      media_position_updated_at: new Date(
        new Date().getTime() - 23000
      ).toISOString(),
      media_title: "I Wasn't Born To Follow",
      media_artist: "The Byrds",
      media_album_name: "The Notorious Byrd Brothers",
      shuffle: false,
      friendly_name: "Living room speaker",
      supported_features: 64063,
    },
  },
  {
    entity_id: "sensor.living_room_temperature",
    state: "21.5",
    area_id: "living_room",
    attributes: {
      state_class: "measurement",
      unit_of_measurement: "°C",
      device_class: "temperature",
      friendly_name: "Temperature",
    },
  },
  {
    entity_id: "sensor.living_room_humidity",
    state: "45",
    area_id: "living_room",
    attributes: {
      state_class: "measurement",
      unit_of_measurement: "%",
      device_class: "humidity",
      friendly_name: "Humidity",
    },
  },
  {
    entity_id: "light.kitchen_spotlights",
    state: "on",
    area_id: "kitchen",
    attributes: {
      supported_color_modes: ["brightness"],
      color_mode: "brightness",
      brightness: 255,
      icon: "mdi:ceiling-light-multiple",
      friendly_name: "Spotlights",
      supported_features: 32,
    },
  },
  {
    entity_id: "light.kitchen_worktop",
    state: "off",
    area_id: "kitchen",
    attributes: {
      supported_color_modes: ["brightness"],
      color_mode: null,
      brightness: null,
      icon: "mdi:light-flood-down",
      friendly_name: "Worktop",
      supported_features: 32,
    },
  },
  {
    entity_id: "switch.coffee_machine",
    state: "on",
    area_id: "kitchen",
    attributes: {
      icon: "mdi:coffee-maker",
      friendly_name: "Coffee machine",
    },
  },
  {
    entity_id: "binary_sensor.kitchen_motion",
    state: "off",
    area_id: "kitchen",
    attributes: {
      device_class: "motion",
      friendly_name: "Motion",
    },
  },
  {
    entity_id: "media_player.kitchen_speaker",
    state: "idle",
    area_id: "kitchen",
    attributes: {
      device_class: "speaker",
      volume_level: 0.18,
      is_volume_muted: false,
      friendly_name: "Kitchen speaker",
      supported_features: 64063,
    },
  },
  {
    entity_id: "sensor.kitchen_temperature",
    state: "22.1",
    area_id: "kitchen",
    attributes: {
      state_class: "measurement",
      unit_of_measurement: "°C",
      device_class: "temperature",
      friendly_name: "Temperature",
    },
  },
  {
    entity_id: "sensor.kitchen_humidity",
    state: "48",
    area_id: "kitchen",
    attributes: {
      state_class: "measurement",
      unit_of_measurement: "%",
      device_class: "humidity",
      friendly_name: "Humidity",
    },
  },
  {
    entity_id: "lock.front_door",
    state: "locked",
    area_id: "entrance",
    attributes: {
      friendly_name: "Front door",
      supported_features: 1,
    },
  },
  {
    entity_id: "binary_sensor.front_door",
    state: "off",
    area_id: "entrance",
    attributes: {
      device_class: "door",
      friendly_name: "Front door",
    },
  },
  {
    entity_id: "alarm_control_panel.home_alarm",
    state: "disarmed",
    area_id: "entrance",
    attributes: {
      changed_by: null,
      code_arm_required: false,
      friendly_name: "Home alarm",
      supported_features: 3,
    },
  },
  {
    entity_id: "light.entrance_ceiling",
    state: "off",
    area_id: "entrance",
    attributes: {
      supported_color_modes: ["brightness"],
      color_mode: null,
      brightness: null,
      friendly_name: "Ceiling light",
      supported_features: 32,
    },
  },
  {
    entity_id: "sensor.front_door_lock_battery",
    state: "88",
    area_id: "entrance",
    attributes: {
      state_class: "measurement",
      unit_of_measurement: "%",
      device_class: "battery",
      friendly_name: "Front door lock battery",
    },
  },
  {
    entity_id: "light.bedroom_ceiling",
    state: "off",
    area_id: "bedroom",
    attributes: {
      supported_color_modes: ["color_temp"],
      color_mode: null,
      brightness: null,
      friendly_name: "Ceiling light",
      supported_features: 44,
    },
  },
  {
    entity_id: "light.bedside_lamp",
    state: "off",
    area_id: "bedroom",
    attributes: {
      supported_color_modes: ["brightness"],
      color_mode: null,
      brightness: null,
      icon: "mdi:lamp",
      friendly_name: "Bedside lamp",
      supported_features: 32,
    },
  },
  {
    entity_id: "cover.bedroom_shutter",
    state: "open",
    area_id: "bedroom",
    attributes: {
      current_position: 100,
      device_class: "shutter",
      friendly_name: "Shutter",
      supported_features: 15,
    },
  },
  {
    entity_id: "media_player.bedroom_speaker",
    state: "off",
    area_id: "bedroom",
    attributes: {
      device_class: "speaker",
      friendly_name: "Bedroom speaker",
      supported_features: 64063,
    },
  },
  {
    entity_id: "binary_sensor.bedroom_motion",
    state: "off",
    area_id: "bedroom",
    attributes: {
      device_class: "motion",
      friendly_name: "Motion",
    },
  },
  {
    entity_id: "sensor.bedroom_motion_battery",
    state: "15",
    area_id: "bedroom",
    attributes: {
      state_class: "measurement",
      unit_of_measurement: "%",
      device_class: "battery",
      friendly_name: "Motion sensor battery",
    },
  },
  {
    entity_id: "sensor.bedroom_temperature",
    state: "19.6",
    area_id: "bedroom",
    attributes: {
      state_class: "measurement",
      unit_of_measurement: "°C",
      device_class: "temperature",
      friendly_name: "Temperature",
    },
  },
  {
    entity_id: "sensor.bedroom_humidity",
    state: "52",
    area_id: "bedroom",
    attributes: {
      state_class: "measurement",
      unit_of_measurement: "%",
      device_class: "humidity",
      friendly_name: "Humidity",
    },
  },
  {
    entity_id: "light.office_desk_lamp",
    state: "on",
    area_id: "office",
    attributes: {
      supported_color_modes: ["brightness"],
      color_mode: "brightness",
      brightness: 200,
      icon: "mdi:desk-lamp",
      friendly_name: "Desk lamp",
      supported_features: 32,
    },
  },
  {
    entity_id: "fan.office_ceiling_fan",
    state: "off",
    area_id: "office",
    attributes: {
      percentage: 0,
      percentage_step: 25,
      friendly_name: "Ceiling fan",
      supported_features: 1,
    },
  },
  {
    entity_id: "binary_sensor.office_window",
    state: "off",
    area_id: "office",
    attributes: {
      device_class: "window",
      friendly_name: "Window",
    },
  },
  {
    entity_id: "sensor.office_temperature",
    state: "21.8",
    area_id: "office",
    attributes: {
      state_class: "measurement",
      unit_of_measurement: "°C",
      device_class: "temperature",
      friendly_name: "Temperature",
    },
  },
  {
    entity_id: "sensor.office_humidity",
    state: "50",
    area_id: "office",
    attributes: {
      state_class: "measurement",
      unit_of_measurement: "%",
      device_class: "humidity",
      friendly_name: "Humidity",
    },
  },
  {
    entity_id: "switch.garden_sprinkler",
    state: "off",
    area_id: "garden",
    attributes: {
      icon: "mdi:sprinkler-variant",
      friendly_name: "Sprinkler",
    },
  },
  {
    entity_id: "light.garden_path",
    state: "off",
    area_id: "garden",
    attributes: {
      supported_color_modes: ["brightness"],
      color_mode: null,
      brightness: null,
      icon: "mdi:outdoor-lamp",
      friendly_name: "Path lights",
      supported_features: 32,
    },
  },
  {
    entity_id: "binary_sensor.garden_gate",
    state: "off",
    area_id: "garden",
    attributes: {
      device_class: "opening",
      friendly_name: "Gate",
    },
  },
  {
    entity_id: "sensor.garden_temperature",
    state: "14.2",
    area_id: "garden",
    attributes: {
      state_class: "measurement",
      unit_of_measurement: "°C",
      device_class: "temperature",
      friendly_name: "Temperature",
    },
  },
  {
    entity_id: "sensor.garden_humidity",
    state: "68",
    area_id: "garden",
    attributes: {
      state_class: "measurement",
      unit_of_measurement: "%",
      device_class: "humidity",
      friendly_name: "Humidity",
    },
  },
  {
    entity_id: "weather.home",
    state: "partlycloudy",
    area_id: "garden",
    attributes: {
      temperature: 14.2,
      temperature_unit: "°C",
      humidity: 68,
      pressure: 1012,
      pressure_unit: "hPa",
      wind_speed: 11.2,
      wind_speed_unit: "km/h",
      friendly_name: "Home",
    },
  },
];
