mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Fix Konnected DS18B20 poll interval (#59954)
* Konnected - Fix DS18B20 poll interval. The poll interval for the DS18B20 was not being sent to the device. * Fix tests
This commit is contained in:
parent
5608b4fb18
commit
3b5a7d001f
@ -304,7 +304,9 @@ class AlarmPanel:
|
||||
def async_ds18b20_sensor_configuration(self):
|
||||
"""Return the configuration map for syncing DS18B20 sensors."""
|
||||
return [
|
||||
self.format_zone(sensor[CONF_ZONE])
|
||||
self.format_zone(
|
||||
sensor[CONF_ZONE], {CONF_POLL_INTERVAL: sensor[CONF_POLL_INTERVAL]}
|
||||
)
|
||||
for sensor in self.stored_configuration[CONF_SENSORS]
|
||||
if sensor[CONF_TYPE] == "ds18b20"
|
||||
]
|
||||
|
@ -144,7 +144,7 @@ async def test_create_and_setup(hass, mock_panel):
|
||||
"sensors": [{"pin": "1"}, {"pin": "2"}, {"pin": "5"}],
|
||||
"actuators": [{"trigger": 0, "pin": "8"}, {"trigger": 1, "pin": "9"}],
|
||||
"dht_sensors": [{"poll_interval": 3, "pin": "6"}],
|
||||
"ds18b20_sensors": [{"pin": "7"}],
|
||||
"ds18b20_sensors": [{"poll_interval": 3, "pin": "7"}],
|
||||
"auth_token": "11223344556677889900",
|
||||
"blink": True,
|
||||
"discovery": True,
|
||||
@ -240,7 +240,7 @@ async def test_create_and_setup_pro(hass, mock_panel):
|
||||
],
|
||||
"sensors": [
|
||||
{"zone": "3", "type": "dht", "poll_interval": 5},
|
||||
{"zone": "7", "type": "ds18b20", "name": "temper"},
|
||||
{"zone": "7", "type": "ds18b20", "poll_interval": 1, "name": "temper"},
|
||||
],
|
||||
"switches": [
|
||||
{"zone": "4"},
|
||||
@ -302,7 +302,7 @@ async def test_create_and_setup_pro(hass, mock_panel):
|
||||
{"trigger": 1, "zone": "alarm1"},
|
||||
],
|
||||
"dht_sensors": [{"poll_interval": 5, "zone": "3"}],
|
||||
"ds18b20_sensors": [{"zone": "7"}],
|
||||
"ds18b20_sensors": [{"poll_interval": 1, "zone": "7"}],
|
||||
"auth_token": "11223344556677889900",
|
||||
"blink": True,
|
||||
"discovery": True,
|
||||
@ -344,7 +344,7 @@ async def test_create_and_setup_pro(hass, mock_panel):
|
||||
"type": "dht",
|
||||
"zone": "3",
|
||||
},
|
||||
{"name": "temper", "poll_interval": 3, "type": "ds18b20", "zone": "7"},
|
||||
{"name": "temper", "poll_interval": 1, "type": "ds18b20", "zone": "7"},
|
||||
],
|
||||
"switches": [
|
||||
{
|
||||
@ -492,7 +492,7 @@ async def test_default_options(hass, mock_panel):
|
||||
"sensors": [{"pin": "1"}, {"pin": "2"}, {"pin": "5"}],
|
||||
"actuators": [{"trigger": 0, "pin": "8"}, {"trigger": 1, "pin": "9"}],
|
||||
"dht_sensors": [{"poll_interval": 3, "pin": "6"}],
|
||||
"ds18b20_sensors": [{"pin": "7"}],
|
||||
"ds18b20_sensors": [{"poll_interval": 3, "pin": "7"}],
|
||||
"auth_token": "11223344556677889900",
|
||||
"blink": True,
|
||||
"discovery": True,
|
||||
|
Loading…
x
Reference in New Issue
Block a user