Sinope Line Voltage Thermostats

So your TH1134 is setuped in HA via ZHA? or sinope-zha ? TH1134ZB-HC is not yet supported in ZHA. I just push a PR for this today. Also in sinope-zha I just update to add support for TH1134ZB-HC today. Tell me how your TH1134ZB-HC is setuped in HA exactly

Salut @claudegel
You might want to make a small modification to https://github.com/claudegel/sinope-zha/blob/926d40aefcd2f89709dd9b9286a962c6a0801ba9/switch.py#L245 from: ‘access=“rWp”’ to ‘access=“rwp”’ my log is showing the following error:

2025-02-08 14:34:08.353 ERROR (SyncWorker_1) [zhaquirks] Unexpected exception importing custom quirk 'switch'
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.13/site-packages/zhaquirks/__init__.py", line 479, in setup
    spec.loader.exec_module(module)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/homeassistant/.homeassistant/config/zhaquirks/switch.py", line 165, in <module>
    class SinopeManufacturerCluster(CustomCluster):
    ...<166 lines>...
            cluster_revision: Final = foundation.ZCL_CLUSTER_REVISION_ATTR
  File "/home/homeassistant/.homeassistant/config/zhaquirks/switch.py", line 182, in SinopeManufacturerCluster
    class AttributeDefs(foundation.BaseAttributeDefs):
    ...<149 lines>...
        cluster_revision: Final = foundation.ZCL_CLUSTER_REVISION_ATTR
  File "/home/homeassistant/.homeassistant/config/zhaquirks/switch.py", line 245, in AttributeDefs
    water_temp_protection_type: Final = foundation.ZCLAttributeDef(
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~^
        id=0x007E, type=t.enum8, access="rWp", is_manufacturer_specific=True
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "<string>", line 10, in __init__
  File "/srv/homeassistant/lib/python3.13/site-packages/zigpy/zcl/foundation.py", line 1265, in __post_init__
    object.__setattr__(self, "access", ZCLAttributeAccess.from_str(self.access))
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.13/site-packages/zigpy/zcl/foundation.py", line 1227, in from_str
    raise ValueError(f"Invalid access mode: {orig_value!r}")
ValueError: Invalid access mode: 'rWp'

Assuming that ‘rwp’ is the correct configuration.

Merci

Good catch I’ll make the correction
Thank you
I’ve fixed it directly in the master

Did you try to change that attribute ? Do you have the possible values for it ?

No sorry I do not have that switch. I just noticed the error when I was upgrading HA.

1 Like

Hello @claudegel, I am having an issue when I attempt to change the configuration backlight_auto_dim_param to bedroom: 2 for a Zigbee thermostat via the Manage Zigbee device configuration window.

2025-03-10 13:52:27.559 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140119952845280] Unexpected exception
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.13/site-packages/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/srv/homeassistant/lib/python3.13/site-packages/homeassistant/core.py", line 2795, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.13/site-packages/homeassistant/core.py", line 2838, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.13/site-packages/homeassistant/helpers/service.py", line 1109, in _async_admin_handler
    await result
  File "/srv/homeassistant/lib/python3.13/site-packages/homeassistant/components/zha/websocket_api.py", line 1333, in set_zigbee_cluster_attributes
    response = await zha_device.write_zigbee_attribute(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<6 lines>...
    )
    ^
  File "/srv/homeassistant/lib/python3.13/site-packages/zha/zigbee/device.py", line 878, in write_zigbee_attribute
    value = convert_zcl_value(value, attr_def.type)
  File "/srv/homeassistant/lib/python3.13/site-packages/zha/application/helpers.py", line 156, in convert_zcl_value
    field_type[value.replace(" ", "_").split(".", 1)[-1]]
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/enum.py", line 789, in __getitem__
    return cls._member_map_[name]
           ~~~~~~~~~~~~~~~~^^^^^^
KeyError: '2'

If I use the ZHA :toolbox: Toolkit: Write Attribute capabilities it works fine. It also display correctly the change via the read attribute in the Manage Zigbee device configuration window. It is only having issues changing that specific configuration no issues to write: OnDemand: 0 or Always: 1

Hi @Cognoquest what is your thermostat model ?

I’ve checked on my side with a TH1134ZB-HC in ZHA manage zigbee device. if I write 2 as a value, I get an error but if I put Backlight.Bedroom or just Bedroom as a value it work. Old zigbee thermostat don’t have the bedroom option. I think it is only the G2 and TH1134. I’m presently switching all SinopĂ© quirks to ZHA V2 and the backlight param will be available as a multiple select option directly in the device page. No need to go in manage zigbee device or use zha toolkit. But meanwhile I’ll check why the third option is not available as a number but only as text value.

Thanks @claudegel the changes that you are proposing sounds great.
F.Y.I. I used Backlight.bedroom as described in https://github.com/claudegel/sinope-zha?tab=readme-ov-file instead of Backlight.Bedroom or Bedroom.

Thanks for reporting I’ll fix the readme for Bedroom. I’ve fix the three values.

Hello,
I’ve noticed that the Sinope thermostat integrations in “Energy” and “Individual Devices Total Usage” appear strangely; sometimes, “Energy Usage” is negative. Has this already been observed? It goes from positive to negative. How can this be corrected?
Thank you.

Bonjour,
Je remarque que les intĂ©grations des thermostats Sinope dans “Energy” “Individual devices total usage” apparaissent bizarrement, il arrive que “Energy usage” soit nĂ©gatif. Il passe du positif au nĂ©gatif. Est-ce que un constat dĂ©jĂ  fait ? Comment corriger le tout.
Merci

Bonjour @mrochette01 quel sensor tu utilises ? hourly_kwh ou hourly_kwh_count. J’ai remarquĂ© que lors du changement d’heure oĂč on a reculĂ© l’heure plusieurs choses se sont passĂ©es don’t Neviweb m’a dĂ©branchĂ© car mon scan_interval avait dĂ©passĂ© 10 minutes. Mais depuis tout est rentrĂ© dans l’ordre.

@claudegel or others, I have some additional information regarding the thermostats backlight option that might be of interest.

If you attempt to change the TH1300ZB or TH1400ZB Backlight option to ‘Bedroom’ . The request even if accepted does not change the configuration of these thermostats. It is ignored by both units.

It’s just because this option, Bedroom, does not exist for TH1300ZB and TH1400ZB. Is is only for G2 and wifi thermostats. This will be fixed in next update of neviweb130 I hope.
You can still fix it with and automation that set backlight to Always during the day and on_demand during night. This way the backlight will be off during night

@claudegel, thanks for the reply. I apologies for not conveying properly my setup for you to provide input. I am one of those that prefers having complete control of its IOT devices for my HA infrastructure. Hence why I selected Sinope Zigbee devices but without the use of its gateway. Though I did not know that neviweb130 was deficient for this. I do not believe neviweb130 will be a solution in my particular case.
You are correct in saying that for this particular case it will be for me to make requests that my devices can acknowledge. I think it might be the devices firmware that is deficient and should reject this invalid call. I included you because I was not sure if there is anything you can do on the HA side to mitigate the situation? So that users are not dupped in believing that this an option for the TH1300ZB and TH1400ZB since no errors are provided as a response to the command. If not maybe this worth mentioning in https://github.com/claudegel/sinope-zha?tab=readme-ov-file Your call
 as usual great work.

Effectively the device firmware is lacking the third possibility. But also the device is lacking a light sensor to know when it is dark in the room. This is the same in ZHA. I’m working on porting the SinopĂ© quirks to ZHA quirks V2 and it will be possible to make the difference between both device type with a select menu to choose the value we need for Bakclight according with what devices are supporting. This will appear directly in the device page.

Bonjour Claude,

J’utilise le capteur daily_kwh.

Michel

Hello Claude,

I’m using the daily_kwh sensor.

Michel

Bonjour @mrochette01 , passe a daily_kwh_count en mettant
state_class: total_increasing
Ca va corriger les quantités négatives.

Hello @claudegel and All,

I am having a listener issue in HA with my Zigbee G2’s. If I set in HA the thermostat to ‘Off’ and then change the temperature on the thermostat directly. That specific change to the thermostat is not reflected in HA, HA thinks the thermostat is still turned off. No issues with the TH1300ZB and TH1400ZB, they appear to behave correctly. Any suggestions?

Hello @claudegel and All,

During power outages, HA does not seem to be aware that my thermostats have no more power, or I just do not know how to get the information
 Is it possible to find out if a Zigbee thermostat is still powered in HA? I run Zigbee G2’s, TH1300ZB and TH1400ZB thermostats.

I run the following automation to fetch the outside temperature similar to what is described here: https://github.com/claudegel/sinope-zha/tree/master?tab=readme-ov-file#automation-examples

  - alias: Thermostats Update Outdoor Temperature
    description: Update the thermostat outdoor temperature
    trigger:
      - platform: state  # send temperature when there are changes
        entity_id: sensor.chelsea_temperature # sensor to get local temperature
    variables:
      # Previously added all your IEEE zigbee thermostats, one per line here. Add all your zigbee thermostats identity_id's, one per line
      thermostats:
        - climate.master_bedroom_thermostat
        - climate.master_bedroom_closet_thermostat
        - climate.guest_bedroom_thermostat
        - climate.third_bedroom_thermostat
        - climate.fourth_bedroom_thermostat
        - climate.kitchen_thermostat
        - climate.familyroom_thermostat
        - climate.main_bathroom_thermostat
        - climate.washroom_thermostat
        - climate.basement_playroom_thermostat
        - climate.basement_office_thermostat
    actions:
      - not:
        - condition: state
          entity_id: sensor.chelsea_temperature
          state: 'unavailable'
      - repeat:  # service will be call for each thermostat
          count: "{{ thermostats | length }}"
          sequence:
            - action: zha.set_zigbee_cluster_attribute
              data:
                ieee: "{{ (device_attr(device_id(thermostats[repeat.index-1]), 'connections') | list)[0][1] }}" # Retrieving the Zigbee ieee id using the entity_id
                endpoint_id: 1
                cluster_id: 0xff01 # 65281
                cluster_type: in
                attribute: 0x0010 # 16 Function: outdoor_temp
                value: "{{ (trigger.to_state.state|float * 100) | int }}" # sending temperature in hundredth of a degree
    mode: single

When the power is turned off to the thermostats, I get the following message: Failed to perform the action climate/set_temperature. Failed to send request: Failed to deliver message: <sl_Status.ZIGBEE_DELIVERY_FAILED: 3074>

I do not know what condition to add to stop the automation from running. Any suggestions would be appreciated.

Thks