sensor:
  # Routeur Solaire #####################################
  - name: "RSolaire.firmwareVersion"
    unique_id: "RSolaire.firmwareVersion"
    state_topic: "RouteurSolaire/out/Version"
  - name: "RSolaire.Tension"
    unique_id: "RSolaire.Tension"
    unit_of_measurement: "V"
    state_class: measurement
    device_class: voltage
    state_topic: "RouteurSolaire/out/Tension"
  - name: "RSolaire.EDF"
    unique_id: "RSolaire.EDF"
    unit_of_measurement: "W"
    state_class: measurement
    device_class: power
    state_topic: "RouteurSolaire/out/EDF"
  - name: "RSolaire.EDFConso_kWh"
    unique_id: "RSolaire.EDFConso_kWh"
    unit_of_measurement: "kWh"
    state_class: total_increasing
    device_class: energy
    state_topic: "RouteurSolaire/out/EDFConso_kWh"
  - name: "RSolaire.EDFInjec_kWh"
    unique_id: "RSolaire.EDFInjec_kWh"
    unit_of_measurement: "kWh"
    state_class: total_increasing
    device_class: energy
    state_topic: "RouteurSolaire/out/EDFInjec_kWh"
  - name: "RSolaire.ProdSolaire"
    unique_id: "RSolaire.ProdSolaire"
    unit_of_measurement: "W"
    state_class: measurement
    device_class: power
    state_topic: "RouteurSolaire/out/ProdSolaire"
  - name: "RSolaire.ProdSolaire_kWh"
    unique_id: "RSolaire.ProdSolaire_kWh"
    unit_of_measurement: "kWh"
    state_class: total_increasing
    device_class: energy
    state_topic: "RouteurSolaire/out/ProdSolaire_kWh"
  - name: "RSolaire.PuissanceVar"
    unique_id: "RSolaire.PuissanceVar"
    unit_of_measurement: "W"
    state_class: measurement
    device_class: power
    state_topic: "RouteurSolaire/out/PuissanceVar"
  - name: "RSolaire.PuissanceVar_kWh"
    unique_id: "RSolaire.PuissanceVar_kWh"
    unit_of_measurement: "kWh"
    state_class: total_increasing
    device_class: energy
    state_topic: "RouteurSolaire/out/PuissanceVar_kWh"
  - name: "RSolaire.ConsigneVar1"
    unique_id: "RSolaire.ConsigneVar1"
    unit_of_measurement: "%"
    state_class: measurement
    device_class: power_factor
    state_topic: "RouteurSolaire/out/ConsigneVar1"
  - name: "RSolaire.ConsigneVar2"
    unique_id: "RSolaire.ConsigneVar2"
    unit_of_measurement: "%"
    state_class: measurement
    device_class: power_factor
    state_topic: "RouteurSolaire/out/ConsigneVar2"
  - name: "RSolaire.OffsetEDF"
    unique_id: "RSolaire.OffsetEDF"
    unit_of_measurement: "W"
    state_topic: "RouteurSolaire/out/OffsetEDF"
  - name: "RSolaire.OffsetSol"
    unique_id: "RSolaire.OffseSol"
    unit_of_measurement: "W"
    state_topic: "RouteurSolaire/out/OffsetSol"    
  # Routeur Solaire #####################################

switch:
  # Routeur Solaire #####################################
  - name: "Forcage Variateur 1"
    unique_id: "forcage_var1"
    state_topic: "RouteurSolaire/in/ForcageVar1"
    command_topic: "RouteurSolaire/in/ForcageVar1"
    payload_on: "1"
    payload_off: "0"
    optimistic: false
    qos: 0
    retain: true 
  - name: "Forcage Variateur 2"
    unique_id: "forcage_var2"
    state_topic: "RouteurSolaire/in/ForcageVar2"
    command_topic: "RouteurSolaire/in/ForcageVar2"
    payload_on: "1"
    payload_off: "0"
    optimistic: false
    qos: 0
    retain: true  
  - name: "Arret Variateur 1"
    unique_id: "arret_var1"
    state_topic: "RouteurSolaire/in/ArretVar1"
    command_topic: "RouteurSolaire/in/ArretVar1"
    payload_on: "1"
    payload_off: "0"
    optimistic: false
    qos: 0
    retain: true
  - name: "Arret Variateur 2"
    unique_id: "arret_var2"
    state_topic: "RouteurSolaire/in/ArretVar2"
    command_topic: "RouteurSolaire/in/ArretVar2"
    payload_on: "1"
    payload_off: "0"
    optimistic: false
    qos: 0
    retain: true
  - name: "Afficher Unitée"
    unique_id: "Afficher_unite"
    state_topic: "RouteurSolaire/in/AfficherUnite"
    command_topic: "RouteurSolaire/in/AfficherUnite"
    payload_on: "1"
    payload_off: "0"
    optimistic: false
    qos: 0
    retain: true
  - name: "Mode Batterie"
    unique_id: "modebatteri"
    state_topic: "RouteurSolaire/in/ModeBatterie"
    command_topic: "RouteurSolaire/in/ModeBatterie"
    payload_on: "1"
    payload_off: "0"
    optimistic: false
    qos: 0
    retain: true 
  # Routeur Solaire #####################################
select:
  - name: "Offset EDF"
    unique_id: "OffsetEDF"
    icon: mdi:arrow-oscillating
    command_topic: "RouteurSolaire/in/OffsetEDF"
    options:
      - "-500"
      - "-400"
      - "-300"
      - "-200"
      - "-100"
      - "0"
      - "100"
      - "200"
      - "300"
      - "400"
      - "500"
  - name: "Offset Sol"
    unique_id: "OffsetSol"
    icon: mdi:arrow-oscillating
    command_topic: "RouteurSolaire/in/OffsetSol"
    options:
      - "0"
      - "100"
      - "200"
      - "300"
      - "400"
      - "500"
  - name: "Consigne Température"
    unique_id: "ConsigneTemp"
    icon: mdi:heat-wave
    command_topic: "RouteurSolaire/in/ConsigneT"
    options:
      - "40"
      - "42"
      - "44"
      - "46"
      - "48"
      - "50"
      - "52"
      - "54"
      - "56"
      - "58"
      - "60"
      - "62"
      - "64"
      - "66"
      - "68"
      - "70"
  # Routeur Solaire #####################################