Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8e604d64d | ||
|
|
bed50f1d09 |
No files matched your search
+1
-1
Submodule apps/ad_toolbox updated: 1a148d4e3f...54c525c843.
@@ -5,7 +5,9 @@ heating_sensors:
|
|||||||
|
|
||||||
sensors:
|
sensors:
|
||||||
binary_sensor.heatpump_winter_mode:
|
binary_sensor.heatpump_winter_mode:
|
||||||
trigger_conditions: false #sensor.month >= 10 or sensor.month <= 4
|
local_expressions:
|
||||||
|
temp_threshold: "self ? 20 : 15"
|
||||||
|
trigger_conditions: sensor.min_temp_outside < temp_threshold
|
||||||
value_selector.target_temperature_heatpump:
|
value_selector.target_temperature_heatpump:
|
||||||
attributes:
|
attributes:
|
||||||
unit_of_measurement: °C
|
unit_of_measurement: °C
|
||||||
@@ -14,7 +16,7 @@ heating_sensors:
|
|||||||
values:
|
values:
|
||||||
winter_mode:
|
winter_mode:
|
||||||
conditions: binary_sensor.heatpump_winter_mode
|
conditions: binary_sensor.heatpump_winter_mode
|
||||||
value: 18
|
value: input_number.heatpump_temperature_winter
|
||||||
default:
|
default:
|
||||||
conditions: True
|
conditions: True
|
||||||
value: input_number.heatpump_temperature
|
value: input_number.heatpump_temperature
|
||||||
@@ -31,10 +33,11 @@ smart_heating_templates_library:
|
|||||||
trigger_conditions:
|
trigger_conditions:
|
||||||
- "not binary_sensor.heatpump_winter_mode and (ext_temperature >= room_temperature or ext_temperature >= target_temperature or cant_open_window) and room_temperature >= (quick_resume ? target_temperature : (target_temperature + temp_threshold))"
|
- "not binary_sensor.heatpump_winter_mode and (ext_temperature >= room_temperature or ext_temperature >= target_temperature or cant_open_window) and room_temperature >= (quick_resume ? target_temperature : (target_temperature + temp_threshold))"
|
||||||
- not binary_sensor.heatpump_winter_mode and self and (ext_temperature >= target_temperature or cant_open_window)
|
- not binary_sensor.heatpump_winter_mode and self and (ext_temperature >= target_temperature or cant_open_window)
|
||||||
- binary_sensor.heatpump_winter_mode and room_temperature <= (target_temperature - 1) and ext_temperature <= 10
|
- binary_sensor.heatpump_winter_mode and room_temperature < target_temperature and ext_temperature <= target_temperature
|
||||||
- binary_sensor.heatpump_winter_mode and self and room_temperature < target_temperature
|
- binary_sensor.heatpump_winter_mode and self and room_temperature < target_temperature + 1
|
||||||
blocking_conditions:
|
blocking_conditions:
|
||||||
- binary_sensor.is_everybody_sleeping and not sleeping_in_the_room and not stay_on_while_sleeping
|
- binary_sensor.is_everybody_sleeping and not sleeping_in_the_room and not stay_on_while_sleeping
|
||||||
|
- binary_sensor.is_everybody_sleeping and binary_sensor.heatpump_winter_mode
|
||||||
- not room_occupancy and not (sleeping_in_the_room or (occupied_tonight and binary_sensor.day_interval_night))
|
- not room_occupancy and not (sleeping_in_the_room or (occupied_tonight and binary_sensor.day_interval_night))
|
||||||
- not binary_sensor.someone_home
|
- not binary_sensor.someone_home
|
||||||
- window_open
|
- window_open
|
||||||
@@ -147,7 +150,7 @@ living_room_heatpump:
|
|||||||
|
|
||||||
constants:
|
constants:
|
||||||
window_open: binary_sensor.living_room_any_window_open
|
window_open: binary_sensor.living_room_any_window_open
|
||||||
ext_temperature: sensor.ext_front_temperature
|
ext_temperature: sensor.ext_back_temperature
|
||||||
room_temperature: sensor.living_room_temperature
|
room_temperature: sensor.living_room_temperature
|
||||||
room_occupancy: binary_sensor.living_room_occupancy
|
room_occupancy: binary_sensor.living_room_occupancy
|
||||||
target_temperature: sensor.target_temperature_heatpump
|
target_temperature: sensor.target_temperature_heatpump
|
||||||
@@ -157,7 +160,7 @@ living_room_heatpump:
|
|||||||
occupied_tonight: input_boolean.living_room_occupied_tonight
|
occupied_tonight: input_boolean.living_room_occupied_tonight
|
||||||
stay_on_while_sleeping: false
|
stay_on_while_sleeping: false
|
||||||
|
|
||||||
target_temperature: sensor.target_temperature_heatpump + 0.5
|
target_temperature: "sensor.target_temperature_heatpump + (binary_sensor.heatpump_winter_mode ? 0 : 0.5)"
|
||||||
hvac_mode: "binary_sensor.heatpump_winter_mode ? 'heat' : 'cool'"
|
hvac_mode: "binary_sensor.heatpump_winter_mode ? 'heat' : 'cool'"
|
||||||
fan_mode: sensor.living_room_heatpump_fan_mode
|
fan_mode: sensor.living_room_heatpump_fan_mode
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -358,7 +358,7 @@ class Vertex2(SmartObject):
|
|||||||
return
|
return
|
||||||
with self._spam_lock:
|
with self._spam_lock:
|
||||||
if self._spam_timer is not None:
|
if self._spam_timer is not None:
|
||||||
self.cancel_timer(self._spam_timer)
|
self.cancel_timer(self._spam_timer, silent=True)
|
||||||
self._spam_timer = None
|
self._spam_timer = None
|
||||||
self._spam_deadline = None
|
self._spam_deadline = None
|
||||||
self._spam_last_interrupt = None
|
self._spam_last_interrupt = None
|
||||||
@@ -399,7 +399,7 @@ class Vertex2(SmartObject):
|
|||||||
if self.no_signal_spam_sensor.get_state() != state:
|
if self.no_signal_spam_sensor.get_state() != state:
|
||||||
self.no_signal_spam_sensor.set_state(state=state)
|
self.no_signal_spam_sensor.set_state(state=state)
|
||||||
if self._spam_timer is not None:
|
if self._spam_timer is not None:
|
||||||
self.cancel_timer(self._spam_timer)
|
self.cancel_timer(self._spam_timer, silent=True)
|
||||||
self._spam_deadline = at + 4
|
self._spam_deadline = at + 4
|
||||||
self._spam_timer = self.run_in(
|
self._spam_timer = self.run_in(
|
||||||
self._expire_no_signal_spam, max(0, self._spam_deadline - now),
|
self._expire_no_signal_spam, max(0, self._spam_deadline - now),
|
||||||
@@ -553,7 +553,7 @@ class Vertex2(SmartObject):
|
|||||||
with processing_lock:
|
with processing_lock:
|
||||||
self._command_processing_deadline = None
|
self._command_processing_deadline = None
|
||||||
if self._command_processing_handle is not None:
|
if self._command_processing_handle is not None:
|
||||||
self.cancel_timer(self._command_processing_handle)
|
self.cancel_timer(self._command_processing_handle, silent=True)
|
||||||
self._command_processing_handle = None
|
self._command_processing_handle = None
|
||||||
|
|
||||||
def terminate(self):
|
def terminate(self):
|
||||||
@@ -735,7 +735,7 @@ class Vertex2(SmartObject):
|
|||||||
with self._command_processing_lock:
|
with self._command_processing_lock:
|
||||||
self._command_processing_deadline = None
|
self._command_processing_deadline = None
|
||||||
if self._command_processing_handle is not None:
|
if self._command_processing_handle is not None:
|
||||||
self.cancel_timer(self._command_processing_handle)
|
self.cancel_timer(self._command_processing_handle, silent=True)
|
||||||
self._command_processing_handle = None
|
self._command_processing_handle = None
|
||||||
if self.command_processing_sensor is not None:
|
if self.command_processing_sensor is not None:
|
||||||
self.command_processing_sensor.set_state(state='off')
|
self.command_processing_sensor.set_state(state='off')
|
||||||
@@ -767,7 +767,7 @@ class Vertex2(SmartObject):
|
|||||||
if only_if_active and self._command_processing_deadline is None:
|
if only_if_active and self._command_processing_deadline is None:
|
||||||
return
|
return
|
||||||
if self._command_processing_handle is not None:
|
if self._command_processing_handle is not None:
|
||||||
self.cancel_timer(self._command_processing_handle)
|
self.cancel_timer(self._command_processing_handle, silent=True)
|
||||||
self._command_processing_deadline = time.monotonic() + self.command_processing_timeout
|
self._command_processing_deadline = time.monotonic() + self.command_processing_timeout
|
||||||
if self.command_processing_sensor.get_state() != 'on':
|
if self.command_processing_sensor.get_state() != 'on':
|
||||||
self.command_processing_sensor.set_state(state='on')
|
self.command_processing_sensor.set_state(state='on')
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class PowerTests(unittest.TestCase):
|
|||||||
connection.shutdown.assert_called_once_with(socket.SHUT_RDWR)
|
connection.shutdown.assert_called_once_with(socket.SHUT_RDWR)
|
||||||
app.turn_off.assert_called_once_with('switch.vertex2')
|
app.turn_off.assert_called_once_with('switch.vertex2')
|
||||||
self.assertFalse(app._vertex2_powered())
|
self.assertFalse(app._vertex2_powered())
|
||||||
app.cancel_timer.assert_called_once_with('timer')
|
app.cancel_timer.assert_called_once_with('timer', silent=True)
|
||||||
self.assertIsNone(app._command_processing_deadline)
|
self.assertIsNone(app._command_processing_deadline)
|
||||||
app.command_processing_sensor.set_state.assert_called_once_with(state='off')
|
app.command_processing_sensor.set_state.assert_called_once_with(state='off')
|
||||||
app.unreachable_sensor.set_state.assert_called_once_with(state='off')
|
app.unreachable_sensor.set_state.assert_called_once_with(state='off')
|
||||||
@@ -486,8 +486,8 @@ class SpamSensorTests(unittest.TestCase):
|
|||||||
self.assertTrue(app._interrupt_stop.is_set())
|
self.assertTrue(app._interrupt_stop.is_set())
|
||||||
self.assertIsNone(app._spam_timer)
|
self.assertIsNone(app._spam_timer)
|
||||||
self.assertIsNone(app._spam_deadline)
|
self.assertIsNone(app._spam_deadline)
|
||||||
app.cancel_timer.assert_any_call('spam_timer')
|
app.cancel_timer.assert_any_call('spam_timer', silent=True)
|
||||||
app.cancel_timer.assert_any_call('timer')
|
app.cancel_timer.assert_any_call('timer', silent=True)
|
||||||
app.no_signal_spam_sensor.set_state.assert_not_called()
|
app.no_signal_spam_sensor.set_state.assert_not_called()
|
||||||
# An already queued expiry callback must also leave the state alone.
|
# An already queued expiry callback must also leave the state alone.
|
||||||
app._expire_no_signal_spam({'deadline': 110})
|
app._expire_no_signal_spam({'deadline': 110})
|
||||||
|
|||||||
Reference in new issue
Block a user