RESTful Switch for a Palazzetti Pellet Stove

Thank you for your quick reply @Noza but if i follow what you telling me, i can’t find my new sensors and switch that I created with your tuto earlier in this topic.
Where have I inject this code in home assistant ? :


entities:
  - entity: switch.switchpoele
  - entity: sensor.temp_poele
  - entity: sensor.etat_poele
show_header_toggle: false
title: Poele
type: entities

?
I wrote this in configuration.yaml, is it correct ?

No you don’t have to. This code is usefull if you use Lovelace in Yaml mode and not with the UI.
If you don’t see the entities oand/or the sensors when you want to add a new card, maybe your sensor.yaml and switch.yaml files are not correct.
Have you created them in the configuration folder?

I found the problem …
first, I injected code about “switch” in scripts.yaml instead of switch.yaml
and second, I hadn’t restarted home assistant after modifying yaml files configuration …

thanks for your help @Noza

Your welcome. Feel free to get in touch if something goes wrong.

Hi,
All work fine with my Jotul Stove with CBox like palazzetti !
But I can see in my Home Assistant instance, all status “switch and values” don’t stop to blink disable/good value … is it normal ?
like this :

No it’s not :stuck_out_tongue: . It seems that it’s working intermittently

It’s not too cold outside right now so my stove is not pluged, perhaps something changed on HA since last year, i will check that in the upcomming days, snow is on it’s way in France (tu es Français d’ailleurs non?).

oui, je suis également français :wink:
j’avais deviné que toi aussi au vu des statuts notés en français sur ton code Palazzetti-Ha

Finaly, I reset my cbox and settings to connect with wifi with my router and now everything works fine …
no timeout and all statuses remain with the correct values.

I’d rather to create 2 buttons (+ and - button) to up or down power of my stove. Do you know how I can do it ?

Hi,
With 2023.6.2, I have a problem because “- platform: command_line” need to be replace by “command_line” instruction.
My old code in switch.yaml is :

  - platform: command_line
    switches:
      switchpoele:
        command_on: "/usr/bin/curl -X GET http://192.168.1.xxx/cgi-bin/sendmsg.lua?cmd=CMD+ON"
        command_off: "/usr/bin/curl -X GET http://192.168.1.xxx/cgi-bin/sendmsg.lua?cmd=CMD+OFF"
        command_state: "/usr/bin/curl -X GET http://192.168.1.xxx/cgi-bin/sendmsg.lua?cmd=GET+STATUS"
        value_template: >- 
          {% if is_state("sensor.id_status_poele", "1") %}
            True
          {% elif is_state("sensor.id_status_poele", "2") %}
            True
          {% elif is_state("sensor.id_status_poele", "3") %}
            True
          {% elif is_state("sensor.id_status_poele", "4") %}
            True
          {% elif is_state("sensor.id_status_poele", "5") %}
            True
          {% else %}
            False
          {% endif %}
        friendly_name: Switch Poële

my new code is :

command_line:
    switches:
        name: switchpoele
        command_on: "/usr/bin/curl -X GET http://192.168.1.xxx/cgi-bin/sendmsg.lua?cmd=CMD+ON"
        command_off: "/usr/bin/curl -X GET http://192.168.1.xxx/cgi-bin/sendmsg.lua?cmd=CMD+OFF"
        command_state: "/usr/bin/curl -X GET http://192.168.1.xxx/cgi-bin/sendmsg.lua?cmd=GET+STATUS"
        value_template: >- 
          {% if is_state("sensor.id_status_poele", "1") %}
            True
          {% elif is_state("sensor.id_status_poele", "2") %}
            True
          {% elif is_state("sensor.id_status_poele", "3") %}
            True
          {% elif is_state("sensor.id_status_poele", "4") %}
            True
          {% elif is_state("sensor.id_status_poele", "5") %}
            True
          {% else %}
            False
          {% endif %}
        friendly_name: Switch Poële

But when I want to restart HA, I have this error :
The system cannot restart because the configuration is not valid: Invalid config for [switch]: required key not provided @ data[‘platform’]. Got None. (See /config/configuration.yaml, line 11).
line 11-12 of my configuration.yaml, I have this :
scene: !include scenes.yaml
switch: !include switchs.yaml

Someone can help me to resolve this problem please ?

Syntax error i guess, try with:

command_line:
  - switch:
      name: switchpoele
      command_on: "/usr/bin/curl -X GET http://192.168.1.xxx/cgi-bin/sendmsg.lua?cmd=CMD+ON"
      command_off: "/usr/bin/curl -X GET http://192.168.1.xxx/cgi-bin/sendmsg.lua?cmd=CMD+OFF"
      command_state: "/usr/bin/curl -X GET http://192.168.1.xxx/cgi-bin/sendmsg.lua?cmd=GET+STATUS"
      value_template: >- 
        {% if is_state("sensor.id_status_poele", "1") %}
          True
        {% elif is_state("sensor.id_status_poele", "2") %}
          True
        {% elif is_state("sensor.id_status_poele", "3") %}
          True
        {% elif is_state("sensor.id_status_poele", "4") %}
          True
        {% elif is_state("sensor.id_status_poele", "5") %}
          True
        {% else %}
          False
        {% endif %}
      friendly_name: Switch Poële

Sorry for my late answer. It’s Ok now.
Thank you