Skip to content

Commit a3ee671

Browse files
authored
Merge pull request #348 from claudegel/Sedna-fix
Sedna valve fix
2 parents 9ee578f + 871e529 commit a3ee671

File tree

8 files changed

+183
-122
lines changed

8 files changed

+183
-122
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ Automations require services to be able to send commande. Ex. light.turn_on. For
255255
- neviweb130.set_refuel_alert, to get an alert when the propane tank is refueled,
256256
- neviweb130.set_humidifier_type, to set the type of humidifier device connected to TH6500WF or TH6250WF.
257257
- neviseb130.set_schedule_mode, to set the schedule mode, manual or auto for TH6500WF or TH6250WF.
258+
- neviweb130.set_flow_alarm_disable_timer, to disable abnormal fow alarm for a period from 1 sec. to 24 hrs.
258259

259260
## Catch Éco Sinopé signal for peak period
260261
If you have at least on thermostat or one load controler registered with Éco-Sinopé program, it is now possible to catch when Neviweb send the signal for pre-heating start period for thermostats or turn_off signal for the load controler. Seven attributes have been added for thermostats and three for load controler to know that peak period is comming and how it is managed:

custom_components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"neviweb130": {
3-
"version": "3.0.7",
3+
"version": "3.0.8",
44
"local_location": "/custom_components/neviweb130/__init__.py",
55
"remote_location": "https://github.com/claudegel/sinope-130/tree/master/custom_components/__init__.py",
66
"visit_repo": "https://github.com/claudegel/sinope-130",

custom_components/neviweb130/__init__.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
ATTR_FLOOR_MIN, ATTR_FLOOR_MODE, ATTR_FLOOR_OUTPUT2,
2828
ATTR_FLOOR_SENSOR, ATTR_FLOW_ALARM1_LENGHT,
2929
ATTR_FLOW_ALARM1_OPTION, ATTR_FLOW_ALARM1_PERIOD,
30-
ATTR_FLOW_ENABLED, ATTR_FLOW_METER_CONFIG,
31-
ATTR_FLOW_THRESHOLD, ATTR_FUEL_ALERT,
32-
ATTR_FUEL_PERCENT_ALERT, ATTR_GAUGE_TYPE, ATTR_HEAT_COOL,
33-
ATTR_HEAT_LOCK_TEMP, ATTR_HUMID_SETPOINT,
30+
ATTR_FLOW_ALARM_TIMER, ATTR_FLOW_ENABLED,
31+
ATTR_FLOW_METER_CONFIG, ATTR_FLOW_THRESHOLD,
32+
ATTR_FUEL_ALERT, ATTR_FUEL_PERCENT_ALERT, ATTR_GAUGE_TYPE,
33+
ATTR_HEAT_COOL, ATTR_HEAT_LOCK_TEMP, ATTR_HUMID_SETPOINT,
3434
ATTR_HUMIDIFIER_TYPE, ATTR_HUMIDITY,
3535
ATTR_INPUT_1_OFF_DELAY, ATTR_INPUT_1_ON_DELAY,
3636
ATTR_INPUT_2_OFF_DELAY, ATTR_INPUT_2_ON_DELAY,
@@ -1089,6 +1089,12 @@ def set_flow_meter_options(self, device_id, alarm, action, lenght, threshold):
10891089
_LOGGER.debug("Flowmeter options.data = %s", data)
10901090
self.set_device_attributes(device_id, data)
10911091

1092+
def set_flow_alarm_timer(self, device_id, timer):
1093+
"""Set flowmeter alarm action disabled timer, for valves with flowmeter."""
1094+
data = {ATTR_FLOW_ALARM_TIMER: timer}
1095+
_LOGGER.debug("Flowmeter alarm disable timer.data = %s", data)
1096+
self.set_device_attributes(device_id, data)
1097+
10921098
def set_led_indicator(self, device_id, state, red, green, blue):
10931099
"""Set devive led indicator intensity and color for on and off state."""
10941100
if state == 1:

custom_components/neviweb130/const.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,3 +338,4 @@
338338
SERVICE_SET_REFUEL_ALERT = "set_refuel_alert"
339339
SERVICE_SET_HUMIDIFIER_TYPE = "set_humidifier_type"
340340
SERVICE_SET_SCHEDULE_MODE = "set_schedule_mode"
341+
SERVICE_SET_FLOW_ALARM_DISABLE_TIMER = "set_flow_alarm_disable_timer"

custom_components/neviweb130/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"dependencies": [],
88
"requirements": [],
99
"iot_class": "cloud_polling",
10-
"version": "3.0.7",
10+
"version": "3.0.8",
1111
"homeassistant": "2025.1.1"
1212
}

custom_components/neviweb130/schema.py

Lines changed: 64 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
ATTR_DRACTIVE, ATTR_EARLY_START, ATTR_FLOOR_AIR_LIMIT,
2020
ATTR_FLOOR_MAX, ATTR_FLOOR_MIN, ATTR_FLOOR_MODE,
2121
ATTR_FLOOR_SENSOR, ATTR_FLOW_ALARM1_PERIOD,
22-
ATTR_FLOW_MODEL_CONFIG, ATTR_FUEL_ALERT,
23-
ATTR_FUEL_PERCENT_ALERT, ATTR_GAUGE_TYPE, ATTR_GREEN,
24-
ATTR_HEAT_LOCK_TEMP, ATTR_HUMIDIFIER_TYPE,
22+
ATTR_FLOW_ALARM_TIMER, ATTR_FLOW_MODEL_CONFIG,
23+
ATTR_FUEL_ALERT, ATTR_FUEL_PERCENT_ALERT, ATTR_GAUGE_TYPE,
24+
ATTR_GREEN, ATTR_HEAT_LOCK_TEMP, ATTR_HUMIDIFIER_TYPE,
2525
ATTR_INTENSITY_MIN, ATTR_KEY_DOUBLE_UP, ATTR_KEYPAD,
2626
ATTR_LANGUAGE, ATTR_LEAK_ALERT, ATTR_LED_OFF_INTENSITY,
2727
ATTR_LED_ON_INTENSITY, ATTR_LIGHT_WATTAGE, ATTR_MODE,
@@ -39,7 +39,7 @@
3939

4040
"""Default parameters values."""
4141

42-
VERSION = "3.0.7"
42+
VERSION = "3.0.8"
4343
SCAN_INTERVAL = timedelta(seconds=540)
4444
HOMEKIT_MODE = False
4545
STAT_INTERVAL = 1800
@@ -561,22 +561,6 @@
561561
}
562562
)
563563

564-
SET_VALVE_ALERT_SCHEMA = vol.Schema(
565-
{
566-
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
567-
vol.Required(ATTR_BATT_ALERT): vol.In(["true", "false"]),
568-
}
569-
)
570-
571-
SET_VALVE_TEMP_ALERT_SCHEMA = vol.Schema(
572-
{
573-
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
574-
vol.Required(ATTR_TEMP_ALERT): vol.All(
575-
vol.Coerce(int), vol.Range(min=0, max=1)
576-
),
577-
}
578-
)
579-
580564
SET_LOAD_DR_OPTIONS_SCHEMA = vol.Schema(
581565
{
582566
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
@@ -617,39 +601,6 @@
617601
}
618602
)
619603

620-
SET_FLOW_METER_MODEL_SCHEMA = vol.Schema(
621-
{
622-
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
623-
vol.Required(ATTR_FLOW_MODEL_CONFIG): vol.All(
624-
cv.ensure_list, [vol.In(FLOW_MODEL)]
625-
),
626-
}
627-
)
628-
629-
SET_FLOW_METER_DELAY_SCHEMA = vol.Schema(
630-
{
631-
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
632-
vol.Required(ATTR_FLOW_ALARM1_PERIOD): vol.All(
633-
cv.ensure_list, [vol.In(FLOW_DURATION)]
634-
),
635-
}
636-
)
637-
638-
SET_FLOW_METER_OPTIONS_SCHEMA = vol.Schema(
639-
{
640-
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
641-
vol.Required(ATTR_TRIGGER_ALARM): vol.In(["on", "off"]),
642-
vol.Required(ATTR_CLOSE_VALVE): vol.In(["on", "off"]),
643-
}
644-
)
645-
646-
SET_POWER_SUPPLY_SCHEMA = vol.Schema(
647-
{
648-
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
649-
vol.Required(ATTR_POWER_SUPPLY): vol.In(["batt", "power", "both"]),
650-
}
651-
)
652-
653604
SET_INPUT_OUTPUT_NAMES_SCHEMA = vol.Schema(
654605
{
655606
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
@@ -768,3 +719,63 @@
768719
vol.Required(ATTR_MODE): vol.In(["home", "away"]),
769720
}
770721
)
722+
723+
"""Valve schema."""
724+
725+
SET_POWER_SUPPLY_SCHEMA = vol.Schema(
726+
{
727+
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
728+
vol.Required(ATTR_POWER_SUPPLY): vol.In(["batt", "power", "both"]),
729+
}
730+
)
731+
732+
SET_FLOW_METER_MODEL_SCHEMA = vol.Schema(
733+
{
734+
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
735+
vol.Required(ATTR_FLOW_MODEL_CONFIG): vol.All(
736+
cv.ensure_list, [vol.In(FLOW_MODEL)]
737+
),
738+
}
739+
)
740+
741+
SET_FLOW_METER_DELAY_SCHEMA = vol.Schema(
742+
{
743+
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
744+
vol.Required(ATTR_FLOW_ALARM1_PERIOD): vol.All(
745+
cv.ensure_list, [vol.In(FLOW_DURATION)]
746+
),
747+
}
748+
)
749+
750+
SET_FLOW_METER_OPTIONS_SCHEMA = vol.Schema(
751+
{
752+
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
753+
vol.Required(ATTR_TRIGGER_ALARM): vol.In(["on", "off"]),
754+
vol.Required(ATTR_CLOSE_VALVE): vol.In(["on", "off"]),
755+
}
756+
)
757+
758+
SET_VALVE_ALERT_SCHEMA = vol.Schema(
759+
{
760+
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
761+
vol.Required(ATTR_BATT_ALERT): vol.In(["true", "false"]),
762+
}
763+
)
764+
765+
SET_VALVE_TEMP_ALERT_SCHEMA = vol.Schema(
766+
{
767+
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
768+
vol.Required(ATTR_TEMP_ALERT): vol.All(
769+
vol.Coerce(int), vol.Range(min=0, max=1)
770+
),
771+
}
772+
)
773+
774+
SET_FLOW_ALARM_DISABLE_TIMER_SCHEMA = vol.Schema(
775+
{
776+
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
777+
vol.Required(ATTR_FLOW_ALARM_TIMER): vol.All(
778+
vol.Coerce(int), vol.Range(min=0, max=86400)
779+
),
780+
}
781+
)

custom_components/neviweb130/services.yaml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set_climate_keypad_lock:
55
description: Name(s) of neviweb130 climate device to lock/unlock the keypad.
66
example: "climate.neviweb130_climate_office"
77
lockKeypad:
8-
description: lockKeypad status to set, «locked» = Locked, «unlocked» = Unlocked, «partiallyLocked» = Tamper protection. For HP6000ZB-xx devices, «partiallyLocked» is not available.
8+
description: LockKeypad status to set, «locked» = Locked, «unlocked» = Unlocked, «partiallyLocked» = Tamper protection. For HP6000ZB-xx devices, «partiallyLocked» is not available.
99
example: "locked"
1010

1111
set_light_keypad_lock:
@@ -15,7 +15,7 @@ set_light_keypad_lock:
1515
description: Name(s) of neviweb130 light device to lock/unlock the keypad.
1616
example: "light.neviweb130_light_office"
1717
lockKeypad:
18-
description: lockKeypad status to set, «locked» = Locked, «unlocked» = Unlocked, «partiallyLocked» = Tamper protection.
18+
description: LockKeypad status to set, «locked» = Locked, «unlocked» = Unlocked, «partiallyLocked» = Tamper protection.
1919
example: "locked"
2020

2121
set_switch_keypad_lock:
@@ -25,7 +25,7 @@ set_switch_keypad_lock:
2525
description: Name(s) of neviweb130 switch device to lock/unlock the keypad.
2626
example: "switch.neviweb130_switch_office"
2727
lockKeypad:
28-
description: lockKeypad status to set, «locked» = Locked, «unlocked» = Unlocked, «partiallyLocked» = Tamper protection.
28+
description: LockKeypad status to set, «locked» = Locked, «unlocked» = Unlocked, «partiallyLocked» = Tamper protection.
2929
example: "locked"
3030

3131
set_light_timer:
@@ -157,7 +157,7 @@ set_wattage:
157157
description: Name(s) of neviweb device to set the wattageOverride (light or dimmer).
158158
example: "light.neviweb_light_office"
159159
loadWattOutput1:
160-
description: wattage to set, 0-1800w light, 0-600w dimmer.
160+
description: Wattage to set, 0-1800w light, 0-600w dimmer.
161161
example: 250
162162

163163
set_setpoint_max:
@@ -350,7 +350,7 @@ set_aux_cycle_output:
350350
description: Set to «on» or «off» to change status of auxiliary cycle length.
351351
example: "on"
352352
value:
353-
description: cycle length in minutes. Accepted values are "15 sec", "5 min", "10 min", "15 min", "20 min", "25 min", "30 min".
353+
description: Cycle length in minutes. Accepted values are "15 sec", "5 min", "10 min", "15 min", "20 min", "25 min", "30 min".
354354
example: "10 min"
355355

356356
set_battery_type:
@@ -428,17 +428,17 @@ set_flow_meter_model:
428428
fields:
429429
entity_id:
430430
description: Name(s) of neviweb130 Sedna 2nd gen device (VA4220ZB).
431-
example: "switch.neviweb130_switch_VA4220ZB"
431+
example: "valve.neviweb130_main_valve"
432432
FlowModel:
433-
description: set to FS4220, or FS4221 or No flow meter.
433+
description: Set to FS4220, or FS4221 or No flow meter.
434434
example: "No flow meter"
435435

436436
set_flow_meter_delay:
437437
description: Set Sedna 2nd gen flow meter delay before leak alarm is turned on.
438438
fields:
439439
entity_id:
440440
description: Name(s) of neviweb130 Sedna 2nd gen device (VA4220ZB).
441-
example: "switch.neviweb130_switch_VA4220ZB"
441+
example: "valve.neviweb130_main_valve"
442442
alarm1Period:
443443
description: Set to 15 min, 30 min, 45 min, 60 min, 75 min, 90 min, 3 h, 6 h, 12 h, and 24 h.
444444
example: "60 min"
@@ -448,9 +448,9 @@ set_flow_meter_options:
448448
fields:
449449
entity_id:
450450
description: Name(s) of neviweb130 Sedna 2nd gen device (VA4220ZB).
451-
example: "valve.neviweb130_valve_VA4220ZB"
451+
example: "valve.neviweb130_main_valve"
452452
triggerAlarm:
453-
description: send leak alert, on/off.
453+
description: Send leak alert, on/off.
454454
example: "on"
455455
closeValve:
456456
description: Close the valve, on/off.
@@ -533,7 +533,7 @@ set_refuel_alert:
533533
description: Name(s) of neviweb130 device LM4110-ZB.
534534
example: "sensor.neviweb130_sensor_propane"
535535
alertRefuel:
536-
description: set to «True» to activate alert, or «False».
536+
description: Set to «True» to activate alert, or «False».
537537
example: True
538538

539539
set_battery_alert:
@@ -569,7 +569,7 @@ set_input_output_names:
569569
description: Set the name for input 2. Max length 10 characters.
570570
example: "alarm_signal_2"
571571
output1name:
572-
description: set the name for output 1. Max length 10 characters.
572+
description: Set the name for output 1. Max length 10 characters.
573573
example: "water_leak"
574574
output2name:
575575
description: Set the name for output 2. Max length 10 characters.
@@ -769,3 +769,13 @@ set_schedule_mode:
769769
setpointMode:
770770
description: Possible values are manual, auto.
771771
example: "auto"
772+
773+
set_flow_alarm_disable_timer:
774+
description: Set a timer to disable the flowmeter alarm action for second gen. valves with flowmeter.
775+
fields:
776+
entity_id:
777+
description: Name(s) of neviweb130 Sedna 2nd gen device (VA4220ZB).
778+
example: "valve.neviweb130_main_valve"
779+
flowMeterAlarmDisableTimer:
780+
description: Values in seconds from 0 to 86400 (24 hrs), 0 = disabled
781+
example: 21600

0 commit comments

Comments
 (0)