cgtobi / netatmo_custom

This repo is a custom component from the beta version of the official HA netatmo component
MIT License
18 stars 8 forks source link

Feature Request: Support for 3-State Switch (NLPO:contactor) #35

Open jp-lno opened 2 months ago

jp-lno commented 2 months ago

Hello,

As discussed on Discord, it would be highly beneficial to fully support a 3-state switch in the integration. Currently, the entity is exposed as a basic switch, and the trigger does not work as expected.

Netatmo API Information

Here is some relevant information from the Netatmo API:

Home Status

{
  "apparent_power": 0,
  "appliance_type": "electric_charger",
  "configured": true,
  "contactor_mode": "auto",
  "firmware_revision": 90,
  "id": "XX",
  "last_seen": 1725555710,
  "last_user_interaction": 1719393597,
  "offload": false,
  "on": false,
  "power": 0,
  "power_source": "mains",
  "reachable": true,
  "type": "NLPO",
  "uptime": 184456,
  "variant": "NLPO:contactor",
  "bridge": "XX"
}

Device Details

{
  "contactor_mode": {
    "type": "boolean",
    "description": "The current mode of the contactor",
    "enum": [
      "temporary_on",
      "auto",
      "off"
    ]
  }
}

Three modes are exposed through an enum:

POST Body Payload to Trigger Mode

To change the mode, you can send the following POST request:

{
  "home": {
    "id": "xx",
    "modules": [
      {
        "id": "xx",
        "contactor_mode": "auto",
        "bridge": "xx"
      }
    ]
  }
}

Suggested Improvement

It could be useful to implement the same preset mode functionality as the NLLF:ventilation device, which provides both slow and fast presets.

Thanks for considering this request!