various incl zha quirks
This commit is contained in:
BIN
custom_zha_quirks/__pycache__/ts0207_rain.cpython-312.pyc
Normal file
BIN
custom_zha_quirks/__pycache__/ts0207_rain.cpython-312.pyc
Normal file
Binary file not shown.
BIN
custom_zha_quirks/__pycache__/ts0207_rain.cpython-313.pyc
Normal file
BIN
custom_zha_quirks/__pycache__/ts0207_rain.cpython-313.pyc
Normal file
Binary file not shown.
BIN
custom_zha_quirks/__pycache__/ts0601_motion.cpython-313.pyc
Normal file
BIN
custom_zha_quirks/__pycache__/ts0601_motion.cpython-313.pyc
Normal file
Binary file not shown.
BIN
custom_zha_quirks/__pycache__/ts0601_smoke.cpython-313.pyc
Normal file
BIN
custom_zha_quirks/__pycache__/ts0601_smoke.cpython-313.pyc
Normal file
Binary file not shown.
Binary file not shown.
137
custom_zha_quirks/ts0207_rain.py.old
Normal file
137
custom_zha_quirks/ts0207_rain.py.old
Normal file
@@ -0,0 +1,137 @@
|
||||
"""Quirk for TS0207 rain sensors."""
|
||||
|
||||
import zigpy.types as t
|
||||
from typing import Any, Type
|
||||
from zigpy.profiles import zha
|
||||
from zigpy.quirks import CustomDevice, CustomCluster
|
||||
from zigpy.zcl.clusters.general import (
|
||||
Basic,
|
||||
Groups,
|
||||
Identify,
|
||||
OnOff,
|
||||
Ota,
|
||||
PowerConfiguration,
|
||||
Scenes,
|
||||
Time,
|
||||
)
|
||||
from zigpy.zcl.clusters.lightlink import LightLink
|
||||
from zigpy.zcl.clusters.security import IasZone
|
||||
from zhaquirks.const import (
|
||||
DEVICE_TYPE,
|
||||
ENDPOINTS,
|
||||
INPUT_CLUSTERS,
|
||||
MODELS_INFO,
|
||||
OUTPUT_CLUSTERS,
|
||||
PROFILE_ID,
|
||||
)
|
||||
from zhaquirks.tuya.mcu import TuyaMCUCluster
|
||||
from zhaquirks.tuya import (
|
||||
TuyaManufCluster,
|
||||
DPToAttributeMapping,
|
||||
EnchantedDevice,
|
||||
TuyaNoBindPowerConfigurationCluster,
|
||||
)
|
||||
|
||||
ZONE_TYPE = 0x0001
|
||||
|
||||
class TuyaSolarRainSensorCluster(TuyaMCUCluster):
|
||||
"""Tuya manufacturer cluster."""
|
||||
|
||||
attributes = TuyaMCUCluster.attributes.copy()
|
||||
attributes.update(
|
||||
{
|
||||
0xEF65: ("light_intensity", t.uint32_t, True),
|
||||
0xEF66: ("average_light_intensity_20mins", t.uint32_t, True),
|
||||
0xEF67: ("todays_max_light_intensity", t.uint32_t, True),
|
||||
0xEF68: ("cleaning_reminder", t.Bool, True),
|
||||
0xEF69: ("rain_sensor_voltage", t.uint32_t, True),
|
||||
}
|
||||
)
|
||||
|
||||
dp_to_attribute: dict[int, DPToAttributeMapping] = {
|
||||
101: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"light_intensity",
|
||||
),
|
||||
102: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"average_light_intensity_20mins",
|
||||
),
|
||||
103: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"todays_max_light_intensity",
|
||||
),
|
||||
104: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"cleaning_reminder",
|
||||
),
|
||||
105: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"rain_sensor_voltage",
|
||||
),
|
||||
}
|
||||
|
||||
data_point_handlers = {
|
||||
101: "_dp_2_attr_update",
|
||||
102: "_dp_2_attr_update",
|
||||
103: "_dp_2_attr_update",
|
||||
104: "_dp_2_attr_update",
|
||||
105: "_dp_2_attr_update",
|
||||
}
|
||||
|
||||
|
||||
class TuyaIasZone(CustomCluster, IasZone):
|
||||
"""IAS Zone for rain sensors."""
|
||||
|
||||
_CONSTANT_ATTRIBUTES = {ZONE_TYPE: IasZone.ZoneType.Water_Sensor}
|
||||
|
||||
|
||||
class TuyaSolarRainSensor(EnchantedDevice):
|
||||
"""TS0207 Rain sensor quirk."""
|
||||
|
||||
signature = {
|
||||
MODELS_INFO: [("_TZ3210_tgvtvdoc", "TS0207")],
|
||||
ENDPOINTS: {
|
||||
1: {
|
||||
PROFILE_ID: zha.PROFILE_ID,
|
||||
DEVICE_TYPE: zha.DeviceType.IAS_ZONE,
|
||||
INPUT_CLUSTERS: [
|
||||
Basic.cluster_id,
|
||||
PowerConfiguration.cluster_id,
|
||||
Groups.cluster_id,
|
||||
Scenes.cluster_id,
|
||||
IasZone.cluster_id,
|
||||
TuyaMCUCluster.cluster_id,
|
||||
],
|
||||
OUTPUT_CLUSTERS: [
|
||||
Identify.cluster_id,
|
||||
Groups.cluster_id,
|
||||
OnOff.cluster_id,
|
||||
Time.cluster_id,
|
||||
Ota.cluster_id,
|
||||
LightLink.cluster_id,
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
replacement = {
|
||||
ENDPOINTS: {
|
||||
1: {
|
||||
PROFILE_ID: zha.PROFILE_ID,
|
||||
DEVICE_TYPE: zha.DeviceType.IAS_ZONE,
|
||||
INPUT_CLUSTERS: [
|
||||
Basic.cluster_id,
|
||||
Groups.cluster_id,
|
||||
Scenes.cluster_id,
|
||||
TuyaNoBindPowerConfigurationCluster,
|
||||
TuyaIasZone,
|
||||
TuyaSolarRainSensorCluster,
|
||||
],
|
||||
OUTPUT_CLUSTERS: [
|
||||
Time.cluster_id,
|
||||
Ota.cluster_id,
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
358
custom_zha_quirks/ts0601_motion copy.py.old
Normal file
358
custom_zha_quirks/ts0601_motion copy.py.old
Normal file
@@ -0,0 +1,358 @@
|
||||
# rivsc https://blog.rivsc.ovh
|
||||
import logging
|
||||
from typing import Final
|
||||
|
||||
from zigpy.quirks.v2 import QuirkBuilder, BinarySensorDeviceClass
|
||||
|
||||
import zigpy.types as t
|
||||
from zigpy.zcl.foundation import ZCLAttributeDef
|
||||
from zigpy.zcl.clusters.measurement import (
|
||||
IlluminanceMeasurement,
|
||||
OccupancySensing,
|
||||
)
|
||||
from zigpy.zcl.clusters.security import IasZone
|
||||
from zigpy.quirks.v2.homeassistant import EntityPlatform, EntityType
|
||||
|
||||
from zhaquirks.tuya import (
|
||||
TuyaLocalCluster,
|
||||
TuyaPowerConfigurationCluster2AAA,
|
||||
)
|
||||
from zhaquirks.tuya.mcu import TuyaMCUCluster, DPToAttributeMapping
|
||||
|
||||
class PresenceState(t.enum8):
|
||||
"""Presence State values"""
|
||||
none = 0x00
|
||||
presence = 0x01
|
||||
peaceful = 0x02
|
||||
small_movement = 0x03
|
||||
large_movement = 0x04
|
||||
|
||||
class TuyaOccupancySensing(OccupancySensing, TuyaLocalCluster):
|
||||
"""Tuya local OccupancySensing cluster."""
|
||||
|
||||
class TuyaIlluminanceMeasurement(IlluminanceMeasurement, TuyaLocalCluster):
|
||||
"""Tuya local IlluminanceMeasurement cluster."""
|
||||
|
||||
class HumanPresenceSensorManufCluster(TuyaMCUCluster):
|
||||
"""Human Presence Sensor ZG-205Z (5.8GHz)"""
|
||||
|
||||
class AttributeDefs(TuyaMCUCluster.AttributeDefs):
|
||||
"""Tuya DataPoints attributes"""
|
||||
|
||||
# Presence state
|
||||
presence_state: Final = ZCLAttributeDef(
|
||||
id=0x0001, # DP 1
|
||||
type=t.uint16_t,
|
||||
access="rp",
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Target distance
|
||||
target_distance: Final = ZCLAttributeDef(
|
||||
id=0x0101, # DP 101
|
||||
type=t.uint16_t,
|
||||
access="rp",
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Illuminance value
|
||||
illuminance_lux: Final = ZCLAttributeDef(
|
||||
id=0x0102, # DP 102
|
||||
type=t.uint16_t,
|
||||
access="rp",
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# None delay time (presence keep time)
|
||||
none_delay_time: Final = ZCLAttributeDef(
|
||||
id=0x0103, # DP 103
|
||||
type=t.uint16_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Indicator
|
||||
indicator: Final = ZCLAttributeDef(
|
||||
id=0x0104, # DP 104
|
||||
type=t.Bool,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Move detection max distance
|
||||
move_detection_max: Final = ZCLAttributeDef(
|
||||
id=0x0107, # DP 107
|
||||
type=t.uint16_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Move detection min distance
|
||||
move_detection_min: Final = ZCLAttributeDef(
|
||||
id=0x0108, # DP 108
|
||||
type=t.uint16_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Breath detection max distance
|
||||
breath_detection_max: Final = ZCLAttributeDef(
|
||||
id=0x0109, # DP 109
|
||||
type=t.uint16_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Breath detection min distance
|
||||
breath_detection_min: Final = ZCLAttributeDef(
|
||||
id=0x0110, # DP 110
|
||||
type=t.uint16_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Small move detection max distance
|
||||
small_move_detection_max: Final = ZCLAttributeDef(
|
||||
id=0x0114, # DP 114
|
||||
type=t.uint16_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Small move detection min distance
|
||||
small_move_detection_min: Final = ZCLAttributeDef(
|
||||
id=0x0115, # DP 115
|
||||
type=t.uint16_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Move sensitivity
|
||||
move_sensitivity: Final = ZCLAttributeDef(
|
||||
id=0x0116, # DP 116
|
||||
type=t.uint8_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Small move sensitivity
|
||||
small_move_sensitivity: Final = ZCLAttributeDef(
|
||||
id=0x0117, # DP 117
|
||||
type=t.uint8_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Breath sensitivity
|
||||
breath_sensitivity: Final = ZCLAttributeDef(
|
||||
id=0x0118, # DP 118
|
||||
type=t.uint8_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
|
||||
dp_to_attribute: dict[int, DPToAttributeMapping] = {
|
||||
1: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"presence_state",
|
||||
converter=PresenceState
|
||||
),
|
||||
101: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"target_distance",
|
||||
converter=lambda x: x / 100 if x is not None else 0
|
||||
),
|
||||
102: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"illuminance_lux",
|
||||
),
|
||||
103: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"none_delay_time",
|
||||
converter=lambda x: x if x is not None else 30
|
||||
),
|
||||
104: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"indicator",
|
||||
),
|
||||
107: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"move_detection_max",
|
||||
converter=lambda x: x / 100 if x is not None else 10
|
||||
),
|
||||
108: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"move_detection_min",
|
||||
converter=lambda x: x / 100 if x is not None else 0
|
||||
),
|
||||
109: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"breath_detection_max",
|
||||
converter=lambda x: x / 100 if x is not None else 6
|
||||
),
|
||||
110: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"breath_detection_min",
|
||||
converter=lambda x: x / 100 if x is not None else 0
|
||||
),
|
||||
114: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"small_move_detection_max",
|
||||
converter=lambda x: x / 100 if x is not None else 6
|
||||
),
|
||||
115: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"small_move_detection_min",
|
||||
converter=lambda x: x / 100 if x is not None else 0
|
||||
),
|
||||
116: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"move_sensitivity",
|
||||
converter=lambda x: x if x is not None else 5
|
||||
),
|
||||
117: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"small_move_sensitivity",
|
||||
converter=lambda x: x if x is not None else 5
|
||||
),
|
||||
118: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"breath_sensitivity",
|
||||
converter=lambda x: x if x is not None else 5
|
||||
),
|
||||
}
|
||||
|
||||
data_point_handlers = {
|
||||
1: "_dp_2_attr_update",
|
||||
101: "_dp_2_attr_update",
|
||||
102: "_dp_2_attr_update",
|
||||
103: "_dp_2_attr_update",
|
||||
104: "_dp_2_attr_update",
|
||||
107: "_dp_2_attr_update",
|
||||
108: "_dp_2_attr_update",
|
||||
109: "_dp_2_attr_update",
|
||||
110: "_dp_2_attr_update",
|
||||
114: "_dp_2_attr_update",
|
||||
115: "_dp_2_attr_update",
|
||||
116: "_dp_2_attr_update",
|
||||
117: "_dp_2_attr_update",
|
||||
118: "_dp_2_attr_update",
|
||||
}
|
||||
|
||||
(
|
||||
QuirkBuilder("_TZE204_dapwryy7", "TS0601")
|
||||
.skip_configuration()
|
||||
.removes(IasZone.cluster_id)
|
||||
.adds(HumanPresenceSensorManufCluster)
|
||||
#.adds(TuyaOccupancySensing)
|
||||
.replaces(TuyaPowerConfigurationCluster2AAA)
|
||||
.replaces(TuyaIlluminanceMeasurement)
|
||||
.binary_sensor(
|
||||
"presence_state",
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
endpoint_id=1,
|
||||
#entity_type=EntityType.STANDARD, # very soon (zigpy channel #dev on github
|
||||
device_class=BinarySensorDeviceClass.OCCUPANCY,
|
||||
fallback_name="Presence"
|
||||
)
|
||||
.enum(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.presence_state.name,
|
||||
PresenceState,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
entity_platform=EntityPlatform.SENSOR,
|
||||
entity_type=EntityType.STANDARD,
|
||||
fallback_name="Presence State",
|
||||
translation_key="presence_state"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.target_distance.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=0.01,
|
||||
min_value=0,
|
||||
max_value=10,
|
||||
#unit="m", # fail :/
|
||||
fallback_name="Target Distance (m)",
|
||||
translation_key="target_distance",
|
||||
#entity_type=EntityType.STANDARD # not yet :/
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.none_delay_time.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=1,
|
||||
min_value=0,
|
||||
max_value=28800,
|
||||
unit="s",
|
||||
fallback_name="Hold Delay Time",
|
||||
translation_key="none_delay_time"
|
||||
)
|
||||
.switch(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.indicator.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
fallback_name="LED Indicator",
|
||||
translation_key="indicator"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.move_detection_max.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=0.01,
|
||||
min_value=0,
|
||||
max_value=10,
|
||||
#unit="m",
|
||||
fallback_name="Move Detection Max Distance (m)",
|
||||
translation_key="move_detection_max"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.move_detection_min.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=0.01,
|
||||
min_value=0,
|
||||
max_value=10,
|
||||
#unit="m",
|
||||
fallback_name="Move Detection Min Distance (m)",
|
||||
translation_key="move_detection_min"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.small_move_detection_max.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=0.01,
|
||||
min_value=0,
|
||||
max_value=6,
|
||||
#unit="m",
|
||||
fallback_name="Small Move Detection Max Distance (m)",
|
||||
translation_key="small_move_detection_max"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.small_move_detection_min.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=0.01,
|
||||
min_value=0,
|
||||
max_value=6,
|
||||
#unit="m",
|
||||
fallback_name="Small Move Detection Min Distance (m)",
|
||||
translation_key="small_move_detection_min"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.breath_detection_max.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=0.01,
|
||||
min_value=0,
|
||||
max_value=6,
|
||||
#unit="m",
|
||||
fallback_name="Breath Detection Max Distance (m)",
|
||||
translation_key="breath_detection_max"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.breath_detection_min.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=0.01,
|
||||
min_value=0,
|
||||
max_value=6,
|
||||
#unit="m",
|
||||
fallback_name="Breath Detection Min Distance (m)",
|
||||
translation_key="breath_detection_min"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.move_sensitivity.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=1,
|
||||
min_value=0,
|
||||
max_value=10,
|
||||
fallback_name="Move Sensitivity",
|
||||
translation_key="move_sensitivity"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.small_move_sensitivity.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=1,
|
||||
min_value=0,
|
||||
max_value=10,
|
||||
fallback_name="Small Move Sensitivity",
|
||||
translation_key="small_move_sensitivity"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.breath_sensitivity.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=1,
|
||||
min_value=0,
|
||||
max_value=10,
|
||||
fallback_name="Breath Sensitivity",
|
||||
translation_key="breath_sensitivity"
|
||||
)
|
||||
.add_to_registry()
|
||||
)
|
361
custom_zha_quirks/ts0601_motion.py
Normal file
361
custom_zha_quirks/ts0601_motion.py
Normal file
@@ -0,0 +1,361 @@
|
||||
import logging
|
||||
from typing import Final
|
||||
|
||||
from zigpy.quirks.v2 import QuirkBuilder, BinarySensorDeviceClass
|
||||
|
||||
import zigpy.types as t
|
||||
from zigpy.zcl.foundation import ZCLAttributeDef
|
||||
from zigpy.zcl.clusters.measurement import (
|
||||
IlluminanceMeasurement,
|
||||
OccupancySensing,
|
||||
)
|
||||
from zigpy.zcl.clusters.security import IasZone
|
||||
from zigpy.quirks.v2.homeassistant import EntityPlatform, EntityType
|
||||
|
||||
from zhaquirks.tuya import (
|
||||
TuyaLocalCluster,
|
||||
TuyaPowerConfigurationCluster2AAA,
|
||||
)
|
||||
from zhaquirks.tuya.mcu import TuyaMCUCluster, DPToAttributeMapping
|
||||
|
||||
class PresenceState(t.enum8):
|
||||
"""Presence State values"""
|
||||
none = 0x00
|
||||
presence = 0x01
|
||||
peaceful = 0x02
|
||||
small_movement = 0x03
|
||||
large_movement = 0x04
|
||||
|
||||
class TuyaOccupancySensing(OccupancySensing, TuyaLocalCluster):
|
||||
"""Tuya local OccupancySensing cluster."""
|
||||
|
||||
class TuyaIlluminanceMeasurement(IlluminanceMeasurement, TuyaLocalCluster):
|
||||
"""Tuya local IlluminanceMeasurement cluster."""
|
||||
|
||||
class HumanPresenceSensorManufCluster(TuyaMCUCluster):
|
||||
"""Human Presence Sensor ZG-205Z (5.8GHz)"""
|
||||
|
||||
class AttributeDefs(TuyaMCUCluster.AttributeDefs):
|
||||
"""Tuya DataPoints attributes"""
|
||||
|
||||
# Presence state
|
||||
presence_state: Final = ZCLAttributeDef(
|
||||
id=0x0001, # DP 1
|
||||
type=t.uint16_t,
|
||||
access="rp",
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Target distance
|
||||
target_distance: Final = ZCLAttributeDef(
|
||||
id=0x0101, # DP 101
|
||||
type=t.uint16_t,
|
||||
access="rp",
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Illuminance value
|
||||
illuminance_lux: Final = ZCLAttributeDef(
|
||||
id=0x0102, # DP 102
|
||||
type=t.uint16_t,
|
||||
access="rp",
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# None delay time (presence keep time)
|
||||
none_delay_time: Final = ZCLAttributeDef(
|
||||
id=0x0103, # DP 103
|
||||
type=t.uint16_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Indicator
|
||||
indicator: Final = ZCLAttributeDef(
|
||||
id=0x0104, # DP 104
|
||||
type=t.Bool,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Move detection max distance
|
||||
move_detection_max: Final = ZCLAttributeDef(
|
||||
id=0x0107, # DP 107
|
||||
type=t.uint16_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Move detection min distance
|
||||
move_detection_min: Final = ZCLAttributeDef(
|
||||
id=0x0108, # DP 108
|
||||
type=t.uint16_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Breath detection max distance
|
||||
breath_detection_max: Final = ZCLAttributeDef(
|
||||
id=0x0109, # DP 109
|
||||
type=t.uint16_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Breath detection min distance
|
||||
breath_detection_min: Final = ZCLAttributeDef(
|
||||
id=0x0110, # DP 110
|
||||
type=t.uint16_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Small move detection max distance
|
||||
small_move_detection_max: Final = ZCLAttributeDef(
|
||||
id=0x0114, # DP 114
|
||||
type=t.uint16_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Small move detection min distance
|
||||
small_move_detection_min: Final = ZCLAttributeDef(
|
||||
id=0x0115, # DP 115
|
||||
type=t.uint16_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Move sensitivity (1 is higher, 9 is lower)
|
||||
move_sensitivity: Final = ZCLAttributeDef(
|
||||
id=0x0116, # DP 116
|
||||
type=t.uint8_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Small move sensitivity
|
||||
small_move_sensitivity: Final = ZCLAttributeDef(
|
||||
id=0x0117, # DP 117
|
||||
type=t.uint8_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
# Breath sensitivity
|
||||
breath_sensitivity: Final = ZCLAttributeDef(
|
||||
id=0x0118, # DP 118
|
||||
type=t.uint8_t,
|
||||
is_manufacturer_specific=True,
|
||||
)
|
||||
|
||||
dp_to_attribute: dict[int, DPToAttributeMapping] = {
|
||||
1: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"presence_state",
|
||||
converter=PresenceState
|
||||
),
|
||||
101: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"target_distance",
|
||||
converter=lambda x: x / 100 if x is not None else 0
|
||||
),
|
||||
102: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"illuminance_lux",
|
||||
),
|
||||
103: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"none_delay_time",
|
||||
# Value in Tuya App is 30 after Factory reset
|
||||
#converter=lambda x: x if x is not None else 30
|
||||
),
|
||||
104: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"indicator",
|
||||
),
|
||||
107: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"move_detection_max",
|
||||
converter=lambda x: x / 100 if x is not None else 10
|
||||
),
|
||||
108: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"move_detection_min",
|
||||
converter=lambda x: x / 100 if x is not None else 0
|
||||
),
|
||||
109: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"breath_detection_max",
|
||||
converter=lambda x: x / 100 if x is not None else 6
|
||||
),
|
||||
110: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"breath_detection_min",
|
||||
converter=lambda x: x / 100 if x is not None else 0
|
||||
),
|
||||
114: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"small_move_detection_max",
|
||||
converter=lambda x: x / 100 if x is not None else 6
|
||||
),
|
||||
115: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"small_move_detection_min",
|
||||
converter=lambda x: x / 100 if x is not None else 0
|
||||
),
|
||||
116: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"move_sensitivity",
|
||||
converter=lambda x: x if x is not None else 5
|
||||
),
|
||||
117: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"small_move_sensitivity",
|
||||
converter=lambda x: x if x is not None else 5
|
||||
),
|
||||
118: DPToAttributeMapping(
|
||||
TuyaMCUCluster.ep_attribute,
|
||||
"breath_sensitivity",
|
||||
converter=lambda x: x if x is not None else 5
|
||||
),
|
||||
}
|
||||
|
||||
data_point_handlers = {
|
||||
1: "_dp_2_attr_update",
|
||||
101: "_dp_2_attr_update",
|
||||
102: "_dp_2_attr_update",
|
||||
103: "_dp_2_attr_update",
|
||||
104: "_dp_2_attr_update",
|
||||
107: "_dp_2_attr_update",
|
||||
108: "_dp_2_attr_update",
|
||||
109: "_dp_2_attr_update",
|
||||
110: "_dp_2_attr_update",
|
||||
114: "_dp_2_attr_update",
|
||||
115: "_dp_2_attr_update",
|
||||
116: "_dp_2_attr_update",
|
||||
117: "_dp_2_attr_update",
|
||||
118: "_dp_2_attr_update",
|
||||
}
|
||||
|
||||
(
|
||||
QuirkBuilder("_TZE204_dapwryy7", "TS0601")
|
||||
.skip_configuration()
|
||||
.removes(IasZone.cluster_id)
|
||||
.adds(HumanPresenceSensorManufCluster)
|
||||
#.adds(TuyaOccupancySensing)
|
||||
.replaces(TuyaPowerConfigurationCluster2AAA)
|
||||
.replaces(TuyaIlluminanceMeasurement)
|
||||
.binary_sensor(
|
||||
"presence_state",
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
endpoint_id=1,
|
||||
#entity_type=EntityType.STANDARD, # very soon (zigpy channel #dev on github
|
||||
device_class=BinarySensorDeviceClass.OCCUPANCY,
|
||||
fallback_name="Presence"
|
||||
)
|
||||
.enum(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.presence_state.name,
|
||||
PresenceState,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
entity_platform=EntityPlatform.SENSOR,
|
||||
entity_type=EntityType.STANDARD,
|
||||
fallback_name="Presence State",
|
||||
translation_key="presence_state"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.illuminance_lux.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=1,
|
||||
min_value=0,
|
||||
max_value=2500,
|
||||
fallback_name="Illuminance (lx)",
|
||||
translation_key="illuminance_lux",
|
||||
#entity_type=EntityType.STANDARD # not yet :/
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.target_distance.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=0.01,
|
||||
min_value=0,
|
||||
max_value=10,
|
||||
fallback_name="Target Distance (m)",
|
||||
translation_key="target_distance",
|
||||
#entity_type=EntityType.STANDARD # not yet :/
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.none_delay_time.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=1,
|
||||
min_value=0,
|
||||
max_value=28800,
|
||||
#unit="s",
|
||||
fallback_name="Hold Delay Time",
|
||||
translation_key="none_delay_time"
|
||||
)
|
||||
.switch(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.indicator.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
fallback_name="LED Indicator",
|
||||
translation_key="indicator"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.move_detection_max.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=0.01,
|
||||
min_value=0,
|
||||
max_value=10,
|
||||
fallback_name="Move Detection Max Distance (m)",
|
||||
translation_key="move_detection_max"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.move_detection_min.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=0.01,
|
||||
min_value=0,
|
||||
max_value=10,
|
||||
fallback_name="Move Detection Min Distance (m)",
|
||||
translation_key="move_detection_min"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.small_move_detection_max.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=0.01,
|
||||
min_value=0,
|
||||
max_value=6,
|
||||
fallback_name="Small Move Detection Max Distance (m)",
|
||||
translation_key="small_move_detection_max"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.small_move_detection_min.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=0.01,
|
||||
min_value=0,
|
||||
max_value=6,
|
||||
fallback_name="Small Move Detection Min Distance (m)",
|
||||
translation_key="small_move_detection_min"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.breath_detection_max.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=0.01,
|
||||
min_value=0,
|
||||
max_value=6,
|
||||
fallback_name="Breath Detection Max Distance (m)",
|
||||
translation_key="breath_detection_max"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.breath_detection_min.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=0.01,
|
||||
min_value=0,
|
||||
max_value=6,
|
||||
fallback_name="Breath Detection Min Distance (m)",
|
||||
translation_key="breath_detection_min"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.move_sensitivity.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=1,
|
||||
min_value=0,
|
||||
max_value=10,
|
||||
fallback_name="Move Sensitivity",
|
||||
translation_key="move_sensitivity"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.small_move_sensitivity.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=1,
|
||||
min_value=0,
|
||||
max_value=10,
|
||||
fallback_name="Small Move Sensitivity",
|
||||
translation_key="small_move_sensitivity"
|
||||
)
|
||||
.number(
|
||||
HumanPresenceSensorManufCluster.AttributeDefs.breath_sensitivity.name,
|
||||
HumanPresenceSensorManufCluster.cluster_id,
|
||||
step=1,
|
||||
min_value=0,
|
||||
max_value=10,
|
||||
fallback_name="Breath Sensitivity",
|
||||
translation_key="breath_sensitivity"
|
||||
)
|
||||
.add_to_registry()
|
||||
)
|
@@ -131,7 +131,8 @@ class TuyaSmokeDetector0601(CustomDevice):
|
||||
|
||||
signature = {
|
||||
MODELS_INFO: [
|
||||
("_TZE200_uebojraa", "TS0601"),
|
||||
"""("_TZE200_uebojraa", "TS0601"),"""
|
||||
("_TZE200_uebojraa"),
|
||||
],
|
||||
ENDPOINTS: {
|
||||
1: {
|
@@ -111,7 +111,9 @@ class TuyaValve(CustomDevice):
|
||||
"""Tuya valve device."""
|
||||
|
||||
signature = {
|
||||
MODELS_INFO: [("_TZE200_sh1btabb", "TS0601")],
|
||||
"""MODELS_INFO: [("_TZE200_sh1btabb", "TS0601")],"""
|
||||
MODELS_INFO: [("_TZE200_sh1btabb")],
|
||||
|
||||
ENDPOINTS: {
|
||||
# <SimpleDescriptor endpoint=1 profile=260 device_type=0x0051
|
||||
# input_clusters=[0x0000, 0x0004, 0x0005, 0xef00]
|
@@ -1,488 +0,0 @@
|
||||
#############################################
|
||||
#############################################
|
||||
#
|
||||
#
|
||||
#############################################
|
||||
#############################################
|
||||
|
||||
#############################################
|
||||
# Variable Substitutions
|
||||
# Give the device a useful name & description here
|
||||
# and change values accordingly.
|
||||
#############################################
|
||||
substitutions:
|
||||
devicename: "esp-entmulti"
|
||||
friendly_name: "Outside Entrance Multisensor"
|
||||
description_comment: "D1 Mini ESP32 outside entranceway with, mmWave presence, PIR and more"
|
||||
|
||||
#if NOT using a secrets file, just replace these with the passwords etc (in quotes)
|
||||
api_key: !secret esp-entmulti_api_key #unfortunately you can't use substitutions in secrets names
|
||||
ota_pass: !secret esp-entmulti_ota_pass #unfortunately you can't use substitutions in secrets names
|
||||
wifi_ssid: !secret wifi_ssid
|
||||
wifi_password: !secret wifi_password
|
||||
fallback_ap_password: !secret fallback_ap_password
|
||||
#Add these if we are giving it a static ip, or remove them in the Wifi section
|
||||
#static_ip_address: !secret esp-entmulti_static_ip
|
||||
#static_ip_gateway: !secret esp-entmulti_gateway
|
||||
#static_ip_subnet: !secret esp-entmulti_subnet
|
||||
|
||||
mqtt_server: !secret mqtt_server
|
||||
mqtt_username: !secret mqtt_username
|
||||
mqtt_password: !secret mqtt_password
|
||||
mqtt_topic: "esphome" #main topic for the mqtt server, call it what you like
|
||||
|
||||
#web_server_username: !secret web_server_username
|
||||
#web_server_password: !secret web_server_password
|
||||
|
||||
update_time: 30s #update time for for general temp sensors etc
|
||||
|
||||
|
||||
#############################################
|
||||
# ESPHome
|
||||
# https://esphome.io/components/esphome.html
|
||||
#############################################
|
||||
esphome:
|
||||
name: ${devicename}
|
||||
friendly_name: ${friendly_name}
|
||||
comment: ${description_comment} #appears on the esphome page in HA
|
||||
min_version: 2024.6.0
|
||||
|
||||
|
||||
#############################################
|
||||
# ESP Platform and Framework
|
||||
# https://esphome.io/components/esp32.html
|
||||
#############################################
|
||||
esp32:
|
||||
board: esp32dev
|
||||
framework:
|
||||
#type: arduino
|
||||
type: esp-idf #Suggested Use ESP-IDF Framework, or Plug Out the UART Cable Might Cause ESP32 Hang.
|
||||
version: recommended #recommended, latest or dev
|
||||
|
||||
#############################################
|
||||
# ESPHome external or custom components to use
|
||||
# https://esphome.io/components/external_components.html
|
||||
# https://github.com/ssieb/esphome_components/tree/master/components/serial
|
||||
#############################################
|
||||
#external_components:
|
||||
# - source:
|
||||
# type: git
|
||||
# url: https://github.com/ssieb/custom_components #Thanks for @ssieb components.
|
||||
# components: [ serial ] #text_sensor that reads lines for a uart. Also, a sensor that reads single binary values from the uart.
|
||||
|
||||
#############################################
|
||||
# ESPHome Logging Enable
|
||||
# https://esphome.io/components/logger.html
|
||||
#############################################
|
||||
logger:
|
||||
level: INFO #INFO Level suggested, or DEBUG for testing
|
||||
#baud_rate: 0 #set to 0 for no logging via UART, needed if you are using it for other serial things (eg PZEM)
|
||||
#esp8266_store_log_strings_in_flash: false
|
||||
#tx_buffer_size: 64
|
||||
|
||||
#############################################
|
||||
# Enable the Home Assistant API
|
||||
# https://esphome.io/components/api.html
|
||||
#############################################
|
||||
api:
|
||||
encryption:
|
||||
key: ${api_key}
|
||||
# on_client_connected:
|
||||
# - esp32_ble_tracker.start_scan:
|
||||
# continuous: true
|
||||
# on_client_disconnected:
|
||||
# - esp32_ble_tracker.stop_scan:
|
||||
|
||||
#############################################
|
||||
# Enable Over the Air Update Capability
|
||||
# https://esphome.io/components/ota.html?highlight=ota
|
||||
#############################################
|
||||
ota:
|
||||
- platform: esphome
|
||||
password: ${ota_pass}
|
||||
|
||||
#############################################
|
||||
# Safe Mode
|
||||
# Safe mode will detect boot loops
|
||||
# https://esphome.io/components/safe_mode
|
||||
#############################################
|
||||
safe_mode:
|
||||
|
||||
#############################################
|
||||
# Wifi Settings
|
||||
# https://esphome.io/components/wifi.html
|
||||
#
|
||||
# Power Save mode (can reduce wifi reliability)
|
||||
# NONE (least power saving, Default for ESP8266)
|
||||
# LIGHT (Default for ESP32)
|
||||
# HIGH (most power saving)
|
||||
#############################################
|
||||
wifi:
|
||||
ssid: ${wifi_ssid}
|
||||
password: ${wifi_password}
|
||||
#power_save_mode: LIGHT #https://esphome.io/components/wifi.html#wifi-power-save-mode
|
||||
#manual_ip: #optional static IP address
|
||||
#static_ip: ${static_ip_address}
|
||||
#gateway: ${static_ip_gateway}
|
||||
#subnet: ${static_ip_subnet}
|
||||
ap: #Details for fallback hotspot in case wifi connection fails https://esphome.io/components/wifi.html#access-point-mode
|
||||
ssid: $devicename fallback AP
|
||||
password: !secret fallback_ap_password
|
||||
ap_timeout: 5min #Time until it brings up fallback AP. default is 1min
|
||||
|
||||
#############################################
|
||||
# Web Portal for display and monitoring
|
||||
# Turning this off is probably a good idea to save resources.
|
||||
# https://esphome.io/components/web_server.html
|
||||
#############################################
|
||||
#web_server:
|
||||
# port: 80
|
||||
# auth:
|
||||
# username: ${web_server_username} #probably a good idea to secure it
|
||||
# password: ${web_server_password}
|
||||
|
||||
#############################################
|
||||
# MQTT Monitoring
|
||||
# https://esphome.io/components/mqtt.html?highlight=mqtt
|
||||
# MUST also have api enabled if you enable MQTT
|
||||
#############################################
|
||||
mqtt:
|
||||
broker: ${mqtt_server}
|
||||
topic_prefix: ${mqtt_topic}/${devicename}
|
||||
username: ${mqtt_username}
|
||||
password: ${mqtt_password}
|
||||
|
||||
#############################################
|
||||
# i2c bus
|
||||
# https://esphome.io/components/i2c.html
|
||||
# 10, 50, 100, 200, 800 are possible settings
|
||||
# for frequency, 50kHz is default
|
||||
#############################################
|
||||
#i2c:
|
||||
# sda: GPIO19
|
||||
# scl: GPIO21
|
||||
# scan: True #look for devices on boot up and report
|
||||
#frequency: 100kHz
|
||||
|
||||
#############################################
|
||||
# UART Serial
|
||||
# hardware on EPS32, but software, and can be glitchy on ESP8266
|
||||
# https://esphome.io/components/uart.html
|
||||
#############################################
|
||||
uart:
|
||||
id: ld2410_uart
|
||||
rx_pin: GPIO16 #For ESP32, you can use any pin, Recommend Use UART_2, Don't use UART_0, It might Cause Boot Fail or System Hang
|
||||
tx_pin: GPIO17 #For ESP32, you can use any pin, Recommend Use UART_2, Don't use UART_0, It might Cause Boot Fail or System Hang
|
||||
baud_rate: 256000 # default for LD2410 is 25600, 8, 0, NONE
|
||||
data_bits: 8
|
||||
stop_bits: 1
|
||||
parity: NONE
|
||||
|
||||
#############################################
|
||||
# Bluetooth
|
||||
# https://esphome.io/components/bluetooth_proxy.html
|
||||
# https://esphome.io/components/esp32_ble_tracker.html
|
||||
# Remember that this takes a LOT of processing. On the
|
||||
# ESP32, enable the IDF framework, and disable the
|
||||
# Web server component. Changing to the IDF framework
|
||||
# needs to be via cable not OTA to change the
|
||||
# partition setup.
|
||||
#############################################
|
||||
#bluetooth_proxy:
|
||||
# active: true
|
||||
# cache_services: true
|
||||
#
|
||||
#esp32_ble_tracker:
|
||||
# scan_parameters:
|
||||
# active: true
|
||||
# continuous: false
|
||||
|
||||
#############################################
|
||||
# Global Variables for use in automations etc
|
||||
# https://esphome.io/guides/automations.html?highlight=globals#global-variables
|
||||
#############################################
|
||||
|
||||
|
||||
#############################################
|
||||
# General esp status LED
|
||||
# https://esphome.io/components/status_led.html
|
||||
#############################################
|
||||
status_led:
|
||||
pin:
|
||||
number: GPIO2 #ESP32 Onboard LED
|
||||
ignore_strapping_warning: True #https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
|
||||
inverted: false
|
||||
|
||||
#############################################
|
||||
# Interval Automations
|
||||
# https://esphome.io/guides/automations.html
|
||||
#############################################
|
||||
|
||||
#############################################
|
||||
# LD2410 Sensors
|
||||
# https://esphome.io/components/sensor/ld2410.html
|
||||
# https://www.hlktech.net/index.php?id=988
|
||||
#############################################
|
||||
ld2410:
|
||||
uart_id: ld2410_uart
|
||||
|
||||
#############################################
|
||||
# Number Sensors (custom component)
|
||||
# refer https://github.com/ssieb/esphome_components/tree/master/components/serial
|
||||
#############################################
|
||||
number:
|
||||
- platform: ld2410
|
||||
timeout:
|
||||
name: Timeout
|
||||
light_threshold:
|
||||
name: Light Threshold
|
||||
max_move_distance_gate:
|
||||
name: Max Move Distance Gate
|
||||
max_still_distance_gate:
|
||||
name: Max Still Distance Gate
|
||||
g0:
|
||||
move_threshold:
|
||||
name: g0 move threshold
|
||||
still_threshold:
|
||||
name: g0 still threshold
|
||||
g1:
|
||||
move_threshold:
|
||||
name: g1 move threshold
|
||||
still_threshold:
|
||||
name: g1 still threshold
|
||||
g2:
|
||||
move_threshold:
|
||||
name: g2 move threshold
|
||||
still_threshold:
|
||||
name: g2 still threshold
|
||||
g3:
|
||||
move_threshold:
|
||||
name: g3 move threshold
|
||||
still_threshold:
|
||||
name: g3 still threshold
|
||||
g4:
|
||||
move_threshold:
|
||||
name: g4 move threshold
|
||||
still_threshold:
|
||||
name: g4 still threshold
|
||||
g5:
|
||||
move_threshold:
|
||||
name: g5 move threshold
|
||||
still_threshold:
|
||||
name: g5 still threshold
|
||||
g6:
|
||||
move_threshold:
|
||||
name: g6 move threshold
|
||||
still_threshold:
|
||||
name: g6 still threshold
|
||||
g7:
|
||||
move_threshold:
|
||||
name: g7 move threshold
|
||||
still_threshold:
|
||||
name: g7 still threshold
|
||||
g8:
|
||||
move_threshold:
|
||||
name: g8 move threshold
|
||||
still_threshold:
|
||||
name: g8 still threshold
|
||||
|
||||
#The ld2410 select allows you to control your LD2410 Sensor.
|
||||
#distance_resolution (Optional): Control the gates distance resolution. Can be 0.75m or 0.2m. Defaults to 0.75m. All options from Select.
|
||||
#baud_rate (Optional): Control the serial port baud rate. Defaults to 256000. Once changed, all sensors will stop working until a fresh install with an updated UART Component configuration. All options from Select.
|
||||
#light_function (Optional): If set, will affect the OUT pin value, based on light threshold. Can be off, low or above. Defaults to off. All options from Select.
|
||||
#out_pin_level (Optional): Control OUT pin away value. Can be low or high. Defaults to low. All options from Select.
|
||||
#ld2410_id (Optional, ID): Manually specify the ID for the LD2410 Sensor component if you are using multiple components.
|
||||
select:
|
||||
- platform: ld2410
|
||||
distance_resolution:
|
||||
name: ${friendly_name} LD2140 Distance Resolution
|
||||
baud_rate:
|
||||
name: ${friendly_name} LD2140 Baud Rate
|
||||
light_function:
|
||||
name: ${friendly_name} LD2140 Light Function
|
||||
out_pin_level:
|
||||
name: ${friendly_name} LD2140 Out Pin Level
|
||||
|
||||
#############################################
|
||||
# General Sensors
|
||||
# https://esphome.io/components/sensor/index.html
|
||||
#############################################
|
||||
sensor:
|
||||
# - platform: bme280_i2c
|
||||
# address: 0x76
|
||||
# update_interval: ${update_time}
|
||||
# temperature:
|
||||
# name: ${friendly_name} BME280 Temp
|
||||
# accuracy_decimals: 1
|
||||
# oversampling: 2x
|
||||
# pressure:
|
||||
# name: ${friendly_name} BME280 Pressure
|
||||
# oversampling: 2x
|
||||
# humidity:
|
||||
# name: ${friendly_name} BME280 Humidity
|
||||
# accuracy_decimals: 1
|
||||
# oversampling: 2x
|
||||
|
||||
################################
|
||||
# WIFI SIGNAL
|
||||
# Quality of Wifi in dBm
|
||||
# https://esphome.io/components/sensor/wifi_signal.html
|
||||
################################
|
||||
- platform: wifi_signal
|
||||
name: ${friendly_name} WiFi Signal
|
||||
update_interval: 20s
|
||||
#retain: true #retain useful if sleeping
|
||||
|
||||
- platform: uptime
|
||||
name: ${friendly_name} Uptime
|
||||
update_interval: 20s
|
||||
|
||||
|
||||
#The ld2410 sensor values
|
||||
- platform: ld2410
|
||||
light:
|
||||
name: Light
|
||||
moving_distance:
|
||||
name : Moving Distance
|
||||
still_distance:
|
||||
name: Still Distance
|
||||
moving_energy:
|
||||
name: Move Energy
|
||||
still_energy:
|
||||
name: Still Energy
|
||||
detection_distance:
|
||||
name: Detection Distance
|
||||
g0:
|
||||
move_energy:
|
||||
name: g0 move energy
|
||||
still_energy:
|
||||
name: g0 still energy
|
||||
g1:
|
||||
move_energy:
|
||||
name: g1 move energy
|
||||
still_energy:
|
||||
name: g1 still energy
|
||||
g2:
|
||||
move_energy:
|
||||
name: g2 move energy
|
||||
still_energy:
|
||||
name: g2 still energy
|
||||
g3:
|
||||
move_energy:
|
||||
name: g3 move energy
|
||||
still_energy:
|
||||
name: g3 still energy
|
||||
g4:
|
||||
move_energy:
|
||||
name: g4 move energy
|
||||
still_energy:
|
||||
name: g4 still energy
|
||||
g5:
|
||||
move_energy:
|
||||
name: g5 move energy
|
||||
still_energy:
|
||||
name: g5 still energy
|
||||
g6:
|
||||
move_energy:
|
||||
name: g6 move energy
|
||||
still_energy:
|
||||
name: g6 still energy
|
||||
g7:
|
||||
move_energy:
|
||||
name: g7 move energy
|
||||
still_energy:
|
||||
name: g7 still energy
|
||||
g8:
|
||||
move_energy:
|
||||
name: g8 move energy
|
||||
still_energy:
|
||||
name: g8 still energy
|
||||
|
||||
# The ld2410 switch allows you to control your LD2410 Sensor.
|
||||
#Bluetooth switch is only useful of you have a B or C model
|
||||
switch:
|
||||
- platform: ld2410
|
||||
engineering_mode:
|
||||
name: ${friendly_name} LD2140 Engineering Mode
|
||||
#bluetooth:
|
||||
#name: ${friendly_name} LD2140 Control Bluetooth
|
||||
|
||||
|
||||
#The ld2410 button allows resetting
|
||||
#button:
|
||||
# - platform: ld2410
|
||||
# factory_reset:
|
||||
# name: ${friendly_name} LD2140 Factory reset"
|
||||
# restart:
|
||||
# name: ${friendly_name} LD2140 Restart
|
||||
## query_params:
|
||||
# name: Query Parameters
|
||||
|
||||
#############################################
|
||||
# Text Sensors
|
||||
# refer https://esphome.io/components/text_sensor/index.html
|
||||
#############################################
|
||||
#The ld2410 text sensor allows you to get information about your LD2410 Sensor.
|
||||
#Bluetooth sensor is only useful of you have a B or C model
|
||||
#text_sensor:
|
||||
# - platform: ld2410
|
||||
# version:
|
||||
# name: ${friendly_name} LD2140 Firmware Version
|
||||
#mac_address:
|
||||
#name: ${friendly_name} LD2140 BT MAC Address
|
||||
|
||||
|
||||
#############################################
|
||||
# Binary Sensors
|
||||
# https://esphome.io/components/binary_sensor/index.html
|
||||
#############################################
|
||||
binary_sensor:
|
||||
|
||||
- platform: ld2410
|
||||
has_target:
|
||||
name: ${friendly_name} Presence
|
||||
has_moving_target:
|
||||
name: ${friendly_name} Moving Target
|
||||
has_still_target:
|
||||
name: ${friendly_name} Still Target
|
||||
out_pin_presence_status:
|
||||
name: ${friendly_name} LD2140 Out Pin Presence Status
|
||||
|
||||
#Standard PIR Sensor
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO13
|
||||
mode:
|
||||
input: True
|
||||
pullup: False
|
||||
inverted: True
|
||||
filters:
|
||||
- delayed_on: 50ms
|
||||
name: ${friendly_name} PIR Sensor
|
||||
device_class: motion
|
||||
|
||||
#RF Input from Vibration Sensor (Green Bin)
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO04
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: True
|
||||
filters:
|
||||
- delayed_on: 20ms
|
||||
name: ${friendly_name} Green Bin motion
|
||||
device_class: vibration
|
||||
|
||||
#RF Input from Vibration Sensor (Red Bin)
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO15
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: True
|
||||
filters:
|
||||
- delayed_on: 20ms
|
||||
name: ${friendly_name} Red Bin motion
|
||||
device_class: vibration
|
@@ -151,6 +151,8 @@ mqtt:
|
||||
topic_prefix: ${mqtt_topic}/${devicename}
|
||||
username: ${mqtt_username}
|
||||
password: ${mqtt_password}
|
||||
discovery: True # enable entity discovery (true is default)
|
||||
discover_ip: True # enable device discovery (true is default)
|
||||
|
||||
#############################################
|
||||
# i2c bus
|
||||
@@ -169,14 +171,14 @@ mqtt:
|
||||
# hardware on EPS32, but software, and can be glitchy on ESP8266
|
||||
# https://esphome.io/components/uart.html
|
||||
#############################################
|
||||
#uart:
|
||||
# id: ld2410_uart
|
||||
# rx_pin: GPIO16 #For ESP32, you can use any pin, Recommend Use UART_2, Don't use UART_0, It might Cause Boot Fail or System Hang
|
||||
# tx_pin: GPIO17 #For ESP32, you can use any pin, Recommend Use UART_2, Don't use UART_0, It might Cause Boot Fail or System Hang
|
||||
# baud_rate: 256000 # default for LD2410 is 25600, 8, 0, NONE
|
||||
# data_bits: 8
|
||||
# stop_bits: 1
|
||||
# parity: NONE
|
||||
uart:
|
||||
id: ld2410_uart
|
||||
rx_pin: GPIO16 #For ESP32, you can use any pin, Recommend Use UART_2, Don't use UART_0, It might Cause Boot Fail or System Hang
|
||||
tx_pin: GPIO17 #For ESP32, you can use any pin, Recommend Use UART_2, Don't use UART_0, It might Cause Boot Fail or System Hang
|
||||
baud_rate: 256000 # default for LD2410 is 25600, 8, 0, NONE
|
||||
data_bits: 8
|
||||
stop_bits: 1
|
||||
parity: NONE
|
||||
|
||||
#############################################
|
||||
# Bluetooth
|
||||
@@ -223,68 +225,68 @@ status_led:
|
||||
# https://esphome.io/components/sensor/ld2410.html
|
||||
# https://www.hlktech.net/index.php?id=988
|
||||
#############################################
|
||||
#ld2410:
|
||||
# uart_id: ld2410_uart
|
||||
ld2410:
|
||||
uart_id: ld2410_uart
|
||||
|
||||
#############################################
|
||||
# Number Sensors (custom component)
|
||||
# refer https://github.com/ssieb/esphome_components/tree/master/components/serial
|
||||
#############################################
|
||||
#number:
|
||||
# - platform: ld2410
|
||||
# timeout:
|
||||
# name: Timeout
|
||||
# light_threshold:
|
||||
# name: Light Threshold
|
||||
# max_move_distance_gate:
|
||||
# name: Max Move Distance Gate
|
||||
# max_still_distance_gate:
|
||||
# name: Max Still Distance Gate
|
||||
# g0:
|
||||
# move_threshold:
|
||||
# name: g0 move threshold
|
||||
# still_threshold:
|
||||
# name: g0 still threshold
|
||||
# g1:
|
||||
# move_threshold:
|
||||
# name: g1 move threshold
|
||||
# still_threshold:
|
||||
# name: g1 still threshold
|
||||
# g2:
|
||||
# move_threshold:
|
||||
# name: g2 move threshold
|
||||
# still_threshold:
|
||||
# name: g2 still threshold
|
||||
# g3:
|
||||
# move_threshold:
|
||||
# name: g3 move threshold
|
||||
# still_threshold:
|
||||
# name: g3 still threshold
|
||||
# g4:
|
||||
# move_threshold:
|
||||
# name: g4 move threshold
|
||||
# still_threshold:
|
||||
# name: g4 still threshold
|
||||
# g5:
|
||||
# move_threshold:
|
||||
# name: g5 move threshold
|
||||
# still_threshold:
|
||||
# name: g5 still threshold
|
||||
# g6:
|
||||
# move_threshold:
|
||||
# name: g6 move threshold
|
||||
# still_threshold:
|
||||
# name: g6 still threshold
|
||||
# g7:
|
||||
# move_threshold:
|
||||
# name: g7 move threshold
|
||||
# still_threshold:
|
||||
# name: g7 still threshold
|
||||
# g8:
|
||||
# move_threshold:
|
||||
# name: g8 move threshold
|
||||
# still_threshold:
|
||||
# name: g8 still threshold
|
||||
number:
|
||||
- platform: ld2410
|
||||
timeout:
|
||||
name: Timeout
|
||||
light_threshold:
|
||||
name: Light Threshold
|
||||
max_move_distance_gate:
|
||||
name: Max Move Distance Gate
|
||||
max_still_distance_gate:
|
||||
name: Max Still Distance Gate
|
||||
g0:
|
||||
move_threshold:
|
||||
name: g0 move threshold
|
||||
still_threshold:
|
||||
name: g0 still threshold
|
||||
g1:
|
||||
move_threshold:
|
||||
name: g1 move threshold
|
||||
still_threshold:
|
||||
name: g1 still threshold
|
||||
g2:
|
||||
move_threshold:
|
||||
name: g2 move threshold
|
||||
still_threshold:
|
||||
name: g2 still threshold
|
||||
g3:
|
||||
move_threshold:
|
||||
name: g3 move threshold
|
||||
still_threshold:
|
||||
name: g3 still threshold
|
||||
g4:
|
||||
move_threshold:
|
||||
name: g4 move threshold
|
||||
still_threshold:
|
||||
name: g4 still threshold
|
||||
g5:
|
||||
move_threshold:
|
||||
name: g5 move threshold
|
||||
still_threshold:
|
||||
name: g5 still threshold
|
||||
g6:
|
||||
move_threshold:
|
||||
name: g6 move threshold
|
||||
still_threshold:
|
||||
name: g6 still threshold
|
||||
g7:
|
||||
move_threshold:
|
||||
name: g7 move threshold
|
||||
still_threshold:
|
||||
name: g7 still threshold
|
||||
g8:
|
||||
move_threshold:
|
||||
name: g8 move threshold
|
||||
still_threshold:
|
||||
name: g8 still threshold
|
||||
|
||||
#The ld2410 select allows you to control your LD2410 Sensor.
|
||||
#distance_resolution (Optional): Control the gates distance resolution. Can be 0.75m or 0.2m. Defaults to 0.75m. All options from Select.
|
||||
@@ -292,16 +294,16 @@ status_led:
|
||||
#light_function (Optional): If set, will affect the OUT pin value, based on light threshold. Can be off, low or above. Defaults to off. All options from Select.
|
||||
#out_pin_level (Optional): Control OUT pin away value. Can be low or high. Defaults to low. All options from Select.
|
||||
#ld2410_id (Optional, ID): Manually specify the ID for the LD2410 Sensor component if you are using multiple components.
|
||||
#select:
|
||||
# - platform: ld2410
|
||||
# distance_resolution:
|
||||
# name: ${friendly_name} LD2140 Distance Resolution
|
||||
# baud_rate:
|
||||
# name: ${friendly_name} LD2140 Baud Rate
|
||||
# light_function:
|
||||
# name: ${friendly_name} LD2140 Light Function
|
||||
# out_pin_level:
|
||||
# name: ${friendly_name} LD2140 Out Pin Level
|
||||
select:
|
||||
- platform: ld2410
|
||||
distance_resolution:
|
||||
name: ${friendly_name} LD2140 Distance Resolution
|
||||
baud_rate:
|
||||
name: ${friendly_name} LD2140 Baud Rate
|
||||
light_function:
|
||||
name: ${friendly_name} LD2140 Light Function
|
||||
out_pin_level:
|
||||
name: ${friendly_name} LD2140 Out Pin Level
|
||||
|
||||
#############################################
|
||||
# General Sensors
|
||||
@@ -339,71 +341,71 @@ sensor:
|
||||
|
||||
|
||||
#The ld2410 sensor values
|
||||
# - platform: ld2410
|
||||
# light:
|
||||
# name: Light
|
||||
# moving_distance:
|
||||
# name : Moving Distance
|
||||
# still_distance:
|
||||
# name: Still Distance
|
||||
# moving_energy:
|
||||
# name: Move Energy
|
||||
# still_energy:
|
||||
# name: Still Energy
|
||||
# detection_distance:
|
||||
# name: Detection Distance
|
||||
# g0:
|
||||
# move_energy:
|
||||
# name: g0 move energy
|
||||
# still_energy:
|
||||
# name: g0 still energy
|
||||
# g1:
|
||||
# move_energy:
|
||||
# name: g1 move energy
|
||||
# still_energy:
|
||||
# name: g1 still energy
|
||||
# g2:
|
||||
# move_energy:
|
||||
# name: g2 move energy
|
||||
# still_energy:
|
||||
# name: g2 still energy
|
||||
# g3:
|
||||
# move_energy:
|
||||
# name: g3 move energy
|
||||
# still_energy:
|
||||
# name: g3 still energy
|
||||
# g4:
|
||||
# move_energy:
|
||||
# name: g4 move energy
|
||||
# still_energy:
|
||||
# name: g4 still energy
|
||||
# g5:
|
||||
# move_energy:
|
||||
# name: g5 move energy
|
||||
# still_energy:
|
||||
# name: g5 still energy
|
||||
# g6:
|
||||
# move_energy:
|
||||
# name: g6 move energy
|
||||
# still_energy:
|
||||
# name: g6 still energy
|
||||
# g7:
|
||||
# move_energy:
|
||||
# name: g7 move energy
|
||||
# still_energy:
|
||||
# name: g7 still energy
|
||||
# g8:
|
||||
# move_energy:
|
||||
# name: g8 move energy
|
||||
# still_energy:
|
||||
# name: g8 still energy
|
||||
- platform: ld2410
|
||||
light:
|
||||
name: Light
|
||||
moving_distance:
|
||||
name : Moving Distance
|
||||
still_distance:
|
||||
name: Still Distance
|
||||
moving_energy:
|
||||
name: Move Energy
|
||||
still_energy:
|
||||
name: Still Energy
|
||||
detection_distance:
|
||||
name: Detection Distance
|
||||
g0:
|
||||
move_energy:
|
||||
name: g0 move energy
|
||||
still_energy:
|
||||
name: g0 still energy
|
||||
g1:
|
||||
move_energy:
|
||||
name: g1 move energy
|
||||
still_energy:
|
||||
name: g1 still energy
|
||||
g2:
|
||||
move_energy:
|
||||
name: g2 move energy
|
||||
still_energy:
|
||||
name: g2 still energy
|
||||
g3:
|
||||
move_energy:
|
||||
name: g3 move energy
|
||||
still_energy:
|
||||
name: g3 still energy
|
||||
g4:
|
||||
move_energy:
|
||||
name: g4 move energy
|
||||
still_energy:
|
||||
name: g4 still energy
|
||||
g5:
|
||||
move_energy:
|
||||
name: g5 move energy
|
||||
still_energy:
|
||||
name: g5 still energy
|
||||
g6:
|
||||
move_energy:
|
||||
name: g6 move energy
|
||||
still_energy:
|
||||
name: g6 still energy
|
||||
g7:
|
||||
move_energy:
|
||||
name: g7 move energy
|
||||
still_energy:
|
||||
name: g7 still energy
|
||||
g8:
|
||||
move_energy:
|
||||
name: g8 move energy
|
||||
still_energy:
|
||||
name: g8 still energy
|
||||
|
||||
# The ld2410 switch allows you to control your LD2410 Sensor.
|
||||
#Bluetooth switch is only useful of you have a B or C model
|
||||
#switch:
|
||||
# - platform: ld2410
|
||||
# engineering_mode:
|
||||
# name: ${friendly_name} LD2140 Engineering Mode
|
||||
switch:
|
||||
- platform: ld2410
|
||||
engineering_mode:
|
||||
name: ${friendly_name} LD2140 Engineering Mode
|
||||
#bluetooth:
|
||||
#name: ${friendly_name} LD2140 Control Bluetooth
|
||||
|
||||
@@ -438,15 +440,15 @@ sensor:
|
||||
#############################################
|
||||
binary_sensor:
|
||||
|
||||
# - platform: ld2410
|
||||
# has_target:
|
||||
# name: ${friendly_name} Presence
|
||||
# has_moving_target:
|
||||
# name: ${friendly_name} Moving Target
|
||||
# has_still_target:
|
||||
# name: ${friendly_name} Still Target
|
||||
# out_pin_presence_status:
|
||||
# name: ${friendly_name} LD2140 Out Pin Presence Status
|
||||
- platform: ld2410
|
||||
has_target:
|
||||
name: ${friendly_name} Presence
|
||||
has_moving_target:
|
||||
name: ${friendly_name} Moving Target
|
||||
has_still_target:
|
||||
name: ${friendly_name} Still Target
|
||||
out_pin_presence_status:
|
||||
name: ${friendly_name} LD2140 Out Pin Presence Status
|
||||
|
||||
#Standard PIR Sensor
|
||||
- platform: gpio
|
||||
@@ -454,10 +456,10 @@ binary_sensor:
|
||||
number: GPIO13
|
||||
mode:
|
||||
input: True
|
||||
pullup: True
|
||||
pullup: False
|
||||
inverted: True
|
||||
filters:
|
||||
- delayed_on: 200ms
|
||||
- delayed_on: 50ms
|
||||
name: ${friendly_name} PIR Sensor
|
||||
device_class: motion
|
||||
|
||||
|
@@ -87,6 +87,7 @@ esp32:
|
||||
CONFIG_FREERTOS_UNICORE: y
|
||||
advanced:
|
||||
ignore_efuse_mac_crc: true
|
||||
ignore_efuse_custom_mac: true
|
||||
|
||||
#############################################
|
||||
# ESPHome Logging Enabl
|
||||
@@ -164,6 +165,9 @@ mqtt:
|
||||
topic_prefix: ${mqtt_topic}/${device_name}
|
||||
username: ${mqtt_username}
|
||||
password: ${mqtt_password}
|
||||
discovery: True # enable entity discovery (true is default)
|
||||
discover_ip: True # enable device discovery (true is default)
|
||||
|
||||
|
||||
#############################################
|
||||
# Time Component
|
||||
|
@@ -183,6 +183,9 @@ mqtt:
|
||||
topic_prefix: ${mqtt_topic}/${devicename}
|
||||
username: ${mqtt_username}
|
||||
password: ${mqtt_password}
|
||||
discovery: True # enable entity discovery (true is default)
|
||||
discover_ip: True # enable device discovery (true is default)
|
||||
|
||||
|
||||
#############################################
|
||||
# i2c bus
|
||||
|
@@ -150,6 +150,8 @@ mqtt:
|
||||
topic_prefix: ${mqtt_topic}/${devicename}
|
||||
username: ${mqtt_username}
|
||||
password: ${mqtt_password}
|
||||
discovery: True # enable entity discovery (true is default)
|
||||
discover_ip: True # enable device discovery (true is default)
|
||||
|
||||
#############################################
|
||||
# Bluetooth
|
||||
|
@@ -1,18 +1,6 @@
|
||||
#############################################
|
||||
#############################################
|
||||
#
|
||||
# HiLink LD1125H mmWave sensor, with BME280 Temp/Hum/Pres Sensor on an ESP32
|
||||
# https://zorruno.com/2024/mmwave-occupancy-with-esp32-ld1125h/
|
||||
#
|
||||
# https://github.com/patrick3399/Hi-Link_mmWave_Radar_ESPHome/tree/main
|
||||
# https://github.com/patrick3399/Hi-Link_mmWave_Radar_ESPHome/blob/main/LD1125H/ESP32-LD1125H-Complete.yaml
|
||||
#
|
||||
# mth1: 0 to 2.8m sensitive
|
||||
# mth2: 2.8 to 8m sensitive
|
||||
# mth3: above 8m sensitive
|
||||
# rmax: max distance
|
||||
# Clearance Time: Mov/Occ to Clearance waiting time
|
||||
# Movement Time: Mov to Occ waiting time
|
||||
#
|
||||
#############################################
|
||||
#############################################
|
||||
@@ -24,8 +12,8 @@
|
||||
#############################################
|
||||
substitutions:
|
||||
devicename: "esp-entmulti"
|
||||
friendly_name: "Entrance Multisensor"
|
||||
description_comment: "D1 Mini ESP32 outside entranceway with BT Proxy, mmWave presence and more"
|
||||
friendly_name: "Outside Entrance Multisensor"
|
||||
description_comment: "D1 Mini ESP32 outside entranceway with, mmWave presence, PIR and more"
|
||||
|
||||
#if NOT using a secrets file, just replace these with the passwords etc (in quotes)
|
||||
api_key: !secret esp-entmulti_api_key #unfortunately you can't use substitutions in secrets names
|
||||
@@ -48,13 +36,16 @@ substitutions:
|
||||
|
||||
update_time: 30s #update time for for general temp sensors etc
|
||||
|
||||
|
||||
#############################################
|
||||
# ESPHome
|
||||
# https://esphome.io/components/esphome.html
|
||||
#############################################
|
||||
esphome:
|
||||
name: ${devicename}
|
||||
friendly_name: ${friendly_name}
|
||||
comment: ${description_comment} #appears on the esphome page in HA
|
||||
min_version: 2024.6.0
|
||||
|
||||
|
||||
#############################################
|
||||
@@ -84,8 +75,8 @@ esp32:
|
||||
# https://esphome.io/components/logger.html
|
||||
#############################################
|
||||
logger:
|
||||
level: DEBUG #INFO Level suggested, or DEBUG for testing
|
||||
baud_rate: 0 #set to 0 for no logging via UART, needed if you are using it for other serial things (eg PZEM)
|
||||
level: INFO #INFO Level suggested, or DEBUG for testing
|
||||
#baud_rate: 0 #set to 0 for no logging via UART, needed if you are using it for other serial things (eg PZEM)
|
||||
#esp8266_store_log_strings_in_flash: false
|
||||
#tx_buffer_size: 64
|
||||
|
||||
@@ -96,6 +87,11 @@ logger:
|
||||
api:
|
||||
encryption:
|
||||
key: ${api_key}
|
||||
# on_client_connected:
|
||||
# - esp32_ble_tracker.start_scan:
|
||||
# continuous: true
|
||||
# on_client_disconnected:
|
||||
# - esp32_ble_tracker.stop_scan:
|
||||
|
||||
#############################################
|
||||
# Enable Over the Air Update Capability
|
||||
@@ -139,8 +135,8 @@ wifi:
|
||||
# Turning this off is probably a good idea to save resources.
|
||||
# https://esphome.io/components/web_server.html
|
||||
#############################################
|
||||
web_server:
|
||||
port: 80
|
||||
#web_server:
|
||||
# port: 80
|
||||
# auth:
|
||||
# username: ${web_server_username} #probably a good idea to secure it
|
||||
# password: ${web_server_password}
|
||||
@@ -173,14 +169,14 @@ mqtt:
|
||||
# hardware on EPS32, but software, and can be glitchy on ESP8266
|
||||
# https://esphome.io/components/uart.html
|
||||
#############################################
|
||||
uart:
|
||||
id: ld2410_uart
|
||||
rx_pin: GPIO16 #For ESP32, you can use any pin, Recommend Use UART_2, Don't use UART_0, It might Cause Boot Fail or System Hang
|
||||
tx_pin: GPIO17 #For ESP32, you can use any pin, Recommend Use UART_2, Don't use UART_0, It might Cause Boot Fail or System Hang
|
||||
baud_rate: 256000 # default for LD2410 is 25600, 8, 0, NONE
|
||||
data_bits: 8
|
||||
stop_bits: 1
|
||||
parity: NONE
|
||||
#uart:
|
||||
# id: ld2410_uart
|
||||
# rx_pin: GPIO16 #For ESP32, you can use any pin, Recommend Use UART_2, Don't use UART_0, It might Cause Boot Fail or System Hang
|
||||
# tx_pin: GPIO17 #For ESP32, you can use any pin, Recommend Use UART_2, Don't use UART_0, It might Cause Boot Fail or System Hang
|
||||
# baud_rate: 256000 # default for LD2410 is 25600, 8, 0, NONE
|
||||
# data_bits: 8
|
||||
# stop_bits: 1
|
||||
# parity: NONE
|
||||
|
||||
#############################################
|
||||
# Bluetooth
|
||||
@@ -192,10 +188,14 @@ uart:
|
||||
# needs to be via cable not OTA to change the
|
||||
# partition setup.
|
||||
#############################################
|
||||
bluetooth_proxy:
|
||||
active: true
|
||||
|
||||
esp32_ble_tracker:
|
||||
#bluetooth_proxy:
|
||||
# active: true
|
||||
# cache_services: true
|
||||
#
|
||||
#esp32_ble_tracker:
|
||||
# scan_parameters:
|
||||
# active: true
|
||||
# continuous: false
|
||||
|
||||
#############################################
|
||||
# Global Variables for use in automations etc
|
||||
@@ -223,68 +223,68 @@ status_led:
|
||||
# https://esphome.io/components/sensor/ld2410.html
|
||||
# https://www.hlktech.net/index.php?id=988
|
||||
#############################################
|
||||
ld2410:
|
||||
uart_id: ld2410_uart
|
||||
#ld2410:
|
||||
# uart_id: ld2410_uart
|
||||
|
||||
#############################################
|
||||
# Number Sensors (custom component)
|
||||
# refer https://github.com/ssieb/esphome_components/tree/master/components/serial
|
||||
#############################################
|
||||
number:
|
||||
- platform: ld2410
|
||||
timeout:
|
||||
name: Timeout
|
||||
light_threshold:
|
||||
name: Light Threshold
|
||||
max_move_distance_gate:
|
||||
name: Max Move Distance Gate
|
||||
max_still_distance_gate:
|
||||
name: Max Still Distance Gate
|
||||
g0:
|
||||
move_threshold:
|
||||
name: g0 move threshold
|
||||
still_threshold:
|
||||
name: g0 still threshold
|
||||
g1:
|
||||
move_threshold:
|
||||
name: g1 move threshold
|
||||
still_threshold:
|
||||
name: g1 still threshold
|
||||
g2:
|
||||
move_threshold:
|
||||
name: g2 move threshold
|
||||
still_threshold:
|
||||
name: g2 still threshold
|
||||
g3:
|
||||
move_threshold:
|
||||
name: g3 move threshold
|
||||
still_threshold:
|
||||
name: g3 still threshold
|
||||
g4:
|
||||
move_threshold:
|
||||
name: g4 move threshold
|
||||
still_threshold:
|
||||
name: g4 still threshold
|
||||
g5:
|
||||
move_threshold:
|
||||
name: g5 move threshold
|
||||
still_threshold:
|
||||
name: g5 still threshold
|
||||
g6:
|
||||
move_threshold:
|
||||
name: g6 move threshold
|
||||
still_threshold:
|
||||
name: g6 still threshold
|
||||
g7:
|
||||
move_threshold:
|
||||
name: g7 move threshold
|
||||
still_threshold:
|
||||
name: g7 still threshold
|
||||
g8:
|
||||
move_threshold:
|
||||
name: g8 move threshold
|
||||
still_threshold:
|
||||
name: g8 still threshold
|
||||
#number:
|
||||
# - platform: ld2410
|
||||
# timeout:
|
||||
# name: Timeout
|
||||
# light_threshold:
|
||||
# name: Light Threshold
|
||||
# max_move_distance_gate:
|
||||
# name: Max Move Distance Gate
|
||||
# max_still_distance_gate:
|
||||
# name: Max Still Distance Gate
|
||||
# g0:
|
||||
# move_threshold:
|
||||
# name: g0 move threshold
|
||||
# still_threshold:
|
||||
# name: g0 still threshold
|
||||
# g1:
|
||||
# move_threshold:
|
||||
# name: g1 move threshold
|
||||
# still_threshold:
|
||||
# name: g1 still threshold
|
||||
# g2:
|
||||
# move_threshold:
|
||||
# name: g2 move threshold
|
||||
# still_threshold:
|
||||
# name: g2 still threshold
|
||||
# g3:
|
||||
# move_threshold:
|
||||
# name: g3 move threshold
|
||||
# still_threshold:
|
||||
# name: g3 still threshold
|
||||
# g4:
|
||||
# move_threshold:
|
||||
# name: g4 move threshold
|
||||
# still_threshold:
|
||||
# name: g4 still threshold
|
||||
# g5:
|
||||
# move_threshold:
|
||||
# name: g5 move threshold
|
||||
# still_threshold:
|
||||
# name: g5 still threshold
|
||||
# g6:
|
||||
# move_threshold:
|
||||
# name: g6 move threshold
|
||||
# still_threshold:
|
||||
# name: g6 still threshold
|
||||
# g7:
|
||||
# move_threshold:
|
||||
# name: g7 move threshold
|
||||
# still_threshold:
|
||||
# name: g7 still threshold
|
||||
# g8:
|
||||
# move_threshold:
|
||||
# name: g8 move threshold
|
||||
# still_threshold:
|
||||
# name: g8 still threshold
|
||||
|
||||
#The ld2410 select allows you to control your LD2410 Sensor.
|
||||
#distance_resolution (Optional): Control the gates distance resolution. Can be 0.75m or 0.2m. Defaults to 0.75m. All options from Select.
|
||||
@@ -292,16 +292,16 @@ number:
|
||||
#light_function (Optional): If set, will affect the OUT pin value, based on light threshold. Can be off, low or above. Defaults to off. All options from Select.
|
||||
#out_pin_level (Optional): Control OUT pin away value. Can be low or high. Defaults to low. All options from Select.
|
||||
#ld2410_id (Optional, ID): Manually specify the ID for the LD2410 Sensor component if you are using multiple components.
|
||||
select:
|
||||
- platform: ld2410
|
||||
distance_resolution:
|
||||
name: ${friendly_name} LD2140 Distance Resolution
|
||||
baud_rate:
|
||||
name: ${friendly_name} LD2140 Baud Rate
|
||||
light_function:
|
||||
name: ${friendly_name} LD2140 Light Function
|
||||
out_pin_level:
|
||||
name: ${friendly_name} LD2140 Out Pin Level
|
||||
#select:
|
||||
# - platform: ld2410
|
||||
# distance_resolution:
|
||||
# name: ${friendly_name} LD2140 Distance Resolution
|
||||
# baud_rate:
|
||||
# name: ${friendly_name} LD2140 Baud Rate
|
||||
# light_function:
|
||||
# name: ${friendly_name} LD2140 Light Function
|
||||
# out_pin_level:
|
||||
# name: ${friendly_name} LD2140 Out Pin Level
|
||||
|
||||
#############################################
|
||||
# General Sensors
|
||||
@@ -335,88 +335,88 @@ sensor:
|
||||
|
||||
- platform: uptime
|
||||
name: ${friendly_name} Uptime
|
||||
update_interval: 10s
|
||||
update_interval: 20s
|
||||
|
||||
|
||||
#The ld2410 sensor values
|
||||
- platform: ld2410
|
||||
light:
|
||||
name: Light
|
||||
moving_distance:
|
||||
name : Moving Distance
|
||||
still_distance:
|
||||
name: Still Distance
|
||||
moving_energy:
|
||||
name: Move Energy
|
||||
still_energy:
|
||||
name: Still Energy
|
||||
detection_distance:
|
||||
name: Detection Distance
|
||||
g0:
|
||||
move_energy:
|
||||
name: g0 move energy
|
||||
still_energy:
|
||||
name: g0 still energy
|
||||
g1:
|
||||
move_energy:
|
||||
name: g1 move energy
|
||||
still_energy:
|
||||
name: g1 still energy
|
||||
g2:
|
||||
move_energy:
|
||||
name: g2 move energy
|
||||
still_energy:
|
||||
name: g2 still energy
|
||||
g3:
|
||||
move_energy:
|
||||
name: g3 move energy
|
||||
still_energy:
|
||||
name: g3 still energy
|
||||
g4:
|
||||
move_energy:
|
||||
name: g4 move energy
|
||||
still_energy:
|
||||
name: g4 still energy
|
||||
g5:
|
||||
move_energy:
|
||||
name: g5 move energy
|
||||
still_energy:
|
||||
name: g5 still energy
|
||||
g6:
|
||||
move_energy:
|
||||
name: g6 move energy
|
||||
still_energy:
|
||||
name: g6 still energy
|
||||
g7:
|
||||
move_energy:
|
||||
name: g7 move energy
|
||||
still_energy:
|
||||
name: g7 still energy
|
||||
g8:
|
||||
move_energy:
|
||||
name: g8 move energy
|
||||
still_energy:
|
||||
name: g8 still energy
|
||||
# - platform: ld2410
|
||||
# light:
|
||||
# name: Light
|
||||
# moving_distance:
|
||||
# name : Moving Distance
|
||||
# still_distance:
|
||||
# name: Still Distance
|
||||
# moving_energy:
|
||||
# name: Move Energy
|
||||
# still_energy:
|
||||
# name: Still Energy
|
||||
# detection_distance:
|
||||
# name: Detection Distance
|
||||
# g0:
|
||||
# move_energy:
|
||||
# name: g0 move energy
|
||||
# still_energy:
|
||||
# name: g0 still energy
|
||||
# g1:
|
||||
# move_energy:
|
||||
# name: g1 move energy
|
||||
# still_energy:
|
||||
# name: g1 still energy
|
||||
# g2:
|
||||
# move_energy:
|
||||
# name: g2 move energy
|
||||
# still_energy:
|
||||
# name: g2 still energy
|
||||
# g3:
|
||||
# move_energy:
|
||||
# name: g3 move energy
|
||||
# still_energy:
|
||||
# name: g3 still energy
|
||||
# g4:
|
||||
# move_energy:
|
||||
# name: g4 move energy
|
||||
# still_energy:
|
||||
# name: g4 still energy
|
||||
# g5:
|
||||
# move_energy:
|
||||
# name: g5 move energy
|
||||
# still_energy:
|
||||
# name: g5 still energy
|
||||
# g6:
|
||||
# move_energy:
|
||||
# name: g6 move energy
|
||||
# still_energy:
|
||||
# name: g6 still energy
|
||||
# g7:
|
||||
# move_energy:
|
||||
# name: g7 move energy
|
||||
# still_energy:
|
||||
# name: g7 still energy
|
||||
# g8:
|
||||
# move_energy:
|
||||
# name: g8 move energy
|
||||
# still_energy:
|
||||
# name: g8 still energy
|
||||
|
||||
# The ld2410 switch allows you to control your LD2410 Sensor.
|
||||
#Bluetooth switch is only useful of you have a B or C model
|
||||
switch:
|
||||
- platform: ld2410
|
||||
engineering_mode:
|
||||
name: ${friendly_name} LD2140 Engineering Mode
|
||||
#switch:
|
||||
# - platform: ld2410
|
||||
# engineering_mode:
|
||||
# name: ${friendly_name} LD2140 Engineering Mode
|
||||
#bluetooth:
|
||||
#name: ${friendly_name} LD2140 Control Bluetooth
|
||||
|
||||
|
||||
#The ld2410 button allows resetting
|
||||
button:
|
||||
- platform: ld2410
|
||||
factory_reset:
|
||||
name: ${friendly_name} LD2140 Factory reset"
|
||||
restart:
|
||||
name: ${friendly_name} LD2140 Restart
|
||||
query_params:
|
||||
name: Query Parameters
|
||||
#button:
|
||||
# - platform: ld2410
|
||||
# factory_reset:
|
||||
# name: ${friendly_name} LD2140 Factory reset"
|
||||
# restart:
|
||||
# name: ${friendly_name} LD2140 Restart
|
||||
## query_params:
|
||||
# name: Query Parameters
|
||||
|
||||
#############################################
|
||||
# Text Sensors
|
||||
@@ -424,10 +424,10 @@ button:
|
||||
#############################################
|
||||
#The ld2410 text sensor allows you to get information about your LD2410 Sensor.
|
||||
#Bluetooth sensor is only useful of you have a B or C model
|
||||
text_sensor:
|
||||
- platform: ld2410
|
||||
version:
|
||||
name: ${friendly_name} LD2140 Firmware Version
|
||||
#text_sensor:
|
||||
# - platform: ld2410
|
||||
# version:
|
||||
# name: ${friendly_name} LD2140 Firmware Version
|
||||
#mac_address:
|
||||
#name: ${friendly_name} LD2140 BT MAC Address
|
||||
|
||||
@@ -438,15 +438,15 @@ text_sensor:
|
||||
#############################################
|
||||
binary_sensor:
|
||||
|
||||
- platform: ld2410
|
||||
has_target:
|
||||
name: ${friendly_name} Presence
|
||||
has_moving_target:
|
||||
name: ${friendly_name} Moving Target
|
||||
has_still_target:
|
||||
name: ${friendly_name} Still Target
|
||||
out_pin_presence_status:
|
||||
name: ${friendly_name} LD2140 Out Pin Presence Status
|
||||
# - platform: ld2410
|
||||
# has_target:
|
||||
# name: ${friendly_name} Presence
|
||||
# has_moving_target:
|
||||
# name: ${friendly_name} Moving Target
|
||||
# has_still_target:
|
||||
# name: ${friendly_name} Still Target
|
||||
# out_pin_presence_status:
|
||||
# name: ${friendly_name} LD2140 Out Pin Presence Status
|
||||
|
||||
#Standard PIR Sensor
|
||||
- platform: gpio
|
||||
@@ -454,7 +454,7 @@ binary_sensor:
|
||||
number: GPIO13
|
||||
mode:
|
||||
input: True
|
||||
pullup: False
|
||||
pullup: True
|
||||
inverted: True
|
||||
filters:
|
||||
- delayed_on: 200ms
|
||||
@@ -469,6 +469,8 @@ binary_sensor:
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: True
|
||||
filters:
|
||||
- delayed_on: 20ms
|
||||
name: ${friendly_name} Green Bin motion
|
||||
device_class: vibration
|
||||
|
||||
|
@@ -1,42 +0,0 @@
|
||||
battery_levels:
|
||||
name: Battery Levels
|
||||
entities:
|
||||
# Moes Multi Button Scene Switches (CR2430)
|
||||
- sensor.master_bedroom_scene_switch_east_zss02_battery
|
||||
- sensor.master_bedroom_scene_switch_west_zss01_battery
|
||||
# Xiaomi Round Buttons (Button cell 2032)
|
||||
- sensor.laundry_drier_start_button_zbt01_battery
|
||||
# Xiaomi Vibration Sensor (Button cell 2032)
|
||||
- sensor.vibration_sensor_1_zvi01_battery
|
||||
# Smoke Detectors (CR123A) NO BATTERY INFO
|
||||
#NO READING- sensor.main_lounge_smoke_detector_zsm01_battery
|
||||
#NO READING- sensor.downstairs_lounge_lounge_smoke_detector_zsm02_battery
|
||||
# Xiaomi Leak Detection (Button cell 2032)
|
||||
- sensor.main_kitchen_sink_leak_zlk01_battery
|
||||
- sensor.guest_bathroom_laundry_sink_leak_zlk02_battery
|
||||
- sensor.basement_laundry_floor_leak_zlk03_battery
|
||||
# offline - sensor.downstairs_kitchen_sink_leak_zlk04_battery
|
||||
# Tuya Leak Detection (2x AA Batteries)
|
||||
- sensor.downstairs_kitchen_sink_leak_zlk05_battery
|
||||
- sensor.downstairs_bathroom_leak_zlk06_battery
|
||||
# Xiaomi Temp, Humidity Sensors (Button cell 2032)
|
||||
- sensor.master_bedroom_temperature_zth01_battery
|
||||
- sensor.bedroom_2_temperature_zth02_battery
|
||||
- sensor.bedroom_3_temperature_zth03_battery
|
||||
- sensor.main_bathroom_temperature_zth04_battery
|
||||
- sensor.storage_loft_temperature_zth05_battery
|
||||
- sensor.downstairs_bedroom_1_temperature_zth06_battery
|
||||
# Tuya Temp, Humidity Sensors (2x AAA Batteries)
|
||||
- sensor.humidor_environment_zth07_battery
|
||||
- sensor.main_kitchen_fridge_temp_zth08_battery
|
||||
# Fantem multisensor Sensors (2X CR123A OR 5V MicroUSB)
|
||||
#TEMP DISABLE - sensor.main_kitchen_multisensor_zms01_battery
|
||||
- sensor.data_cupboard_multisensor_zms02_battery
|
||||
# Tuya LCD Temp, Humidity Sensors (2x AAA Batteries)
|
||||
- sensor.office_lcd_temperature_ztl01_battery
|
||||
- sensor.master_bedroom_lcd_temperature_ztl02_battery
|
||||
- sensor.downstairs_lounge_lcd_temperature_ztl03_battery
|
||||
# Sonoff PIR (CR2450)
|
||||
- sensor.piano_pir_zir01_battery
|
||||
# Tuya Reed Switch (2x AAA Batteries)
|
||||
#NO READING - sensor.downstairs_bedrooms_hatch_zrs01_battery
|
@@ -1,10 +0,0 @@
|
||||
nspanel_keepawake:
|
||||
name: Entities to keep NSPanel Awake
|
||||
# Keeps the bedroom NSPanel Bright if any of these are true
|
||||
# If 'all' is set to true, they are 'ANDed' otherwise 'ORd'
|
||||
#all: true
|
||||
entities:
|
||||
- binary_sensor.inverted_quiet_time_sensor
|
||||
- light.tasmo_arlecrgb_3522_bulb_3
|
||||
- light.tasmo_ifan02_3793_bedrm1_1
|
||||
- light.tasmo_ks811t_3647_bedrm1_1b
|
@@ -1,21 +0,0 @@
|
||||
simulation_lights:
|
||||
name: Simulation Lights
|
||||
# Lights included in 'away from home' random patterns
|
||||
entities:
|
||||
- switch.tasmo_ks811d_1242_entrance_a # Entranceway Main Lights
|
||||
- switch.tasmo_ks811d_0302_entrybath_a # Entranceway Guest Bathroom Lights
|
||||
- switch.tasmo_ks811d_6110_kitchen_a # Main Kitchen, Main Lights
|
||||
- switch.tasmo_ks811d_6110_kitchen_b # Main Kitchen, Bench Lights
|
||||
- switch.tasmo_ks811s_2940_hallway_1a # Hallway Main Lights
|
||||
- switch.tasmo_ks811d_1701_stairs_2a # Stairs, Lower ceiling lights
|
||||
- switch.tasmo_ks811t_0702_lounge_3a # Lounge Main, South
|
||||
- switch.tasmo_ks811t_0702_lounge_3b # Lounge Main, Middle
|
||||
- switch.tasmo_ks811t_0702_lounge_3c # Lounge Main, North (above stairs)
|
||||
- switch.tasmo_ks811t_0707_downstloun_2a # Foxhole Lounge Main Lights
|
||||
- switch.tasmo_ks811t_0707_downstloun_2b # Foxhole Lounge Wall Lights
|
||||
- switch.tasmo_ks811s_3136_downstbed2_1a # Foxhole Craft Room Lights
|
||||
- switch.tasmo_ks811t_3642_downstbed1_1a # Foxhole Main Bedroom, Main Lights
|
||||
- switch.tasmo_ks811t_2192_downstkitch_1a # Foxhole Kitchen Entry Lights
|
||||
- switch.tasmo_ks811t_2192_downstkitch_1b # Foxhole Kitchen Main Lights
|
||||
- switch.tasmo_ks811t_1181_downstbath_a # Foxhole Downstairs Bathroom Main Lights
|
||||
- switch.tasmo_s4chan_4231_underhouselights_b # Underhouse Main Lights
|
44
packages/battery_levels.yaml
Normal file
44
packages/battery_levels.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
sensor:
|
||||
- platform: group
|
||||
name: Battery Levels
|
||||
type: min
|
||||
entities:
|
||||
# Moes Multi Button Scene Switches (CR2430)
|
||||
- sensor.master_bedroom_scene_switch_east_zss02_battery
|
||||
- sensor.master_bedroom_scene_switch_west_zss01_battery
|
||||
# Xiaomi Round Buttons (Button cell 2032)
|
||||
- sensor.laundry_drier_start_button_zbt01_battery
|
||||
# Xiaomi Vibration Sensor (Button cell 2032)
|
||||
- sensor.vibration_sensor_1_zvi01_battery
|
||||
# Smoke Detectors (CR123A) NO BATTERY INFO
|
||||
#NO READING- sensor.main_lounge_smoke_detector_zsm01_battery
|
||||
#NO READING- sensor.downstairs_lounge_lounge_smoke_detector_zsm02_battery
|
||||
# Xiaomi Leak Detection (Button cell 2032)
|
||||
- sensor.main_kitchen_sink_leak_zlk01_battery
|
||||
- sensor.guest_bathroom_laundry_sink_leak_zlk02_battery
|
||||
- sensor.basement_laundry_floor_leak_zlk03_battery
|
||||
# offline - sensor.downstairs_kitchen_sink_leak_zlk04_battery
|
||||
# Tuya Leak Detection (2x AA Batteries)
|
||||
- sensor.downstairs_kitchen_sink_leak_zlk05_battery
|
||||
- sensor.downstairs_bathroom_leak_zlk06_battery
|
||||
# Xiaomi Temp, Humidity Sensors (Button cell 2032)
|
||||
- sensor.master_bedroom_temperature_zth01_battery
|
||||
- sensor.bedroom_2_temperature_zth02_battery
|
||||
- sensor.bedroom_3_temperature_zth03_battery
|
||||
- sensor.main_bathroom_temperature_zth04_battery
|
||||
- sensor.storage_loft_temperature_zth05_battery
|
||||
- sensor.downstairs_bedroom_1_temperature_zth06_battery
|
||||
# Tuya Temp, Humidity Sensors (2x AAA Batteries)
|
||||
- sensor.humidor_environment_zth07_battery
|
||||
- sensor.main_kitchen_fridge_temp_zth08_battery
|
||||
# Fantem multisensor Sensors (2X CR123A OR 5V MicroUSB)
|
||||
#TEMP DISABLE - sensor.main_kitchen_multisensor_zms01_battery
|
||||
- sensor.data_cupboard_multisensor_zms02_battery
|
||||
# Tuya LCD Temp, Humidity Sensors (2x AAA Batteries)
|
||||
- sensor.office_lcd_temperature_ztl01_battery
|
||||
- sensor.master_bedroom_lcd_temperature_ztl02_battery
|
||||
- sensor.downstairs_lounge_lcd_temperature_ztl03_battery
|
||||
# Sonoff PIR (CR2450)
|
||||
- sensor.piano_pir_zir01_battery
|
||||
# Tuya Reed Switch (2x AAA Batteries)
|
||||
#NO READING - sensor.downstairs_bedrooms_hatch_zrs01_battery
|
95
packages/climate_aircon_controls.yaml
Normal file
95
packages/climate_aircon_controls.yaml
Normal file
@@ -0,0 +1,95 @@
|
||||
# input_select for dropdown menu to select the timer duration or cancel
|
||||
input_select:
|
||||
master_bedroom_climate_timer_duration:
|
||||
name: Master Bedroom Aircon Sleep
|
||||
options:
|
||||
- "1 hour"
|
||||
- "2 hours"
|
||||
- "3 hours"
|
||||
- "Cancel sleep timer"
|
||||
initial: "Cancel sleep timer"
|
||||
icon: mdi:timer-outline
|
||||
|
||||
# Single timer for managing the countdown
|
||||
timer:
|
||||
master_bedroom_climate_timer:
|
||||
name: Master Bedroom Aircon Timer
|
||||
duration: "00:00:00" # Initial duration; will be set dynamically
|
||||
|
||||
# Automation to start or cancel the timer based on the dropdown selection
|
||||
automation:
|
||||
- alias: "Start or Cancel Master Bedroom Climate Timer"
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_select.master_bedroom_climate_timer_duration
|
||||
action:
|
||||
- service: timer.cancel
|
||||
entity_id: timer.master_bedroom_climate_timer
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.master_bedroom_climate_timer_duration
|
||||
state: "1 hour"
|
||||
sequence:
|
||||
- service: timer.start
|
||||
data:
|
||||
entity_id: timer.master_bedroom_climate_timer
|
||||
duration: "01:00:00"
|
||||
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.master_bedroom_climate_timer_duration
|
||||
state: "1 minute"
|
||||
sequence:
|
||||
- service: timer.start
|
||||
data:
|
||||
entity_id: timer.master_bedroom_climate_timer
|
||||
duration: "00:01:00"
|
||||
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.master_bedroom_climate_timer_duration
|
||||
state: "2 hours"
|
||||
sequence:
|
||||
- service: timer.start
|
||||
data:
|
||||
entity_id: timer.master_bedroom_climate_timer
|
||||
duration: "02:00:00"
|
||||
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.master_bedroom_climate_timer_duration
|
||||
state: "3 hours"
|
||||
sequence:
|
||||
- service: timer.start
|
||||
data:
|
||||
entity_id: timer.master_bedroom_climate_timer
|
||||
duration: "03:00:00"
|
||||
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.master_bedroom_climate_timer_duration
|
||||
state: "Cancel sleep timer"
|
||||
sequence:
|
||||
- service: timer.cancel
|
||||
entity_id: timer.master_bedroom_climate_timer
|
||||
- service: climate.turn_off
|
||||
target:
|
||||
entity_id: climate.master_bedroom
|
||||
|
||||
# Automation to turn off the climate entity when the timer finishes
|
||||
- alias: "Turn Off Master Bedroom Climate on Timer Completion"
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: timer.finished
|
||||
event_data:
|
||||
entity_id: timer.master_bedroom_climate_timer
|
||||
action:
|
||||
- service: climate.turn_off
|
||||
target:
|
||||
entity_id: climate.master_bedroom
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.master_bedroom_climate_timer_duration
|
||||
option: "Cancel sleep timer" # Reset to the initial value
|
@@ -1,8 +0,0 @@
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
inverted_quiet_time_sensor:
|
||||
value_template: >-
|
||||
{{ is_state('input_boolean.quiet_time', 'off') }}
|
||||
#device_class: None
|
||||
friendly_name: Quiet Time (Inverted)
|
45
packages/nspanel_keepawake.yaml
Normal file
45
packages/nspanel_keepawake.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
#nspanel_keepawake:
|
||||
# name: Entities to keep NSPanel Awake
|
||||
# unique_id: Entities_to_keep_NSPanel_Awake
|
||||
# # Keeps the bedroom NSPanel Bright if any of these are true
|
||||
# If 'all' is set to true, they are 'ANDed' otherwise 'ORd'
|
||||
#all: true
|
||||
# entities:
|
||||
# - binary_sensor.inverted_quiet_time_sensor
|
||||
# - light.tasmo_arlecrgb_3522_bulb_3
|
||||
# - light.tasmo_ifan02_3793_bedrm1_1
|
||||
# - light.tasmo_ks811t_3647_bedrm1_1b
|
||||
|
||||
#light:
|
||||
# - platform: template
|
||||
# sensors:
|
||||
# inverted_quiet_time_sensor:
|
||||
# value_template: >-
|
||||
# {{ is_state('input_boolean.quiet_time', 'off') }}
|
||||
# #device_class: None
|
||||
# friendly_name: Quiet Time (Inverted)
|
||||
|
||||
light:
|
||||
- platform: template
|
||||
lights:
|
||||
inverted_quiet_time_as_light:
|
||||
friendly_name: "Inverted Quiet time as light"
|
||||
unique_id: "inverted quiet time as light"
|
||||
value_template: "{{ is_state('input_boolean.quiet_time', 'off') }}"
|
||||
turn_on:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.inverted_quiet_time_light
|
||||
turn_off:
|
||||
service: light.turn_off
|
||||
target:
|
||||
entity_id: light.inverted_quiet_time_as_light
|
||||
|
||||
- platform: group
|
||||
name: "Entities to keep NSPanel Awake"
|
||||
unique_id: "Entities to keep NSPanel Awake"
|
||||
entities:
|
||||
- light.inverted_quiet_time_as_light
|
||||
- light.tasmo_arlecrgb_3522_bulb_3
|
||||
- light.tasmo_ifan02_3793_bedrm1_1
|
||||
- light.tasmo_ks811t_3647_bedrm1_1b
|
44
packages/simulation_lights.yaml
Normal file
44
packages/simulation_lights.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
#simulation_lights:
|
||||
# name: Simulation Lights
|
||||
# # Lights included in 'away from home' random patterns
|
||||
# entities:
|
||||
# - switch.tasmo_ks811d_1242_entrance_a # Entranceway Main Lights
|
||||
# - switch.tasmo_ks811d_0302_entrybath_a # Entranceway Guest Bathroom Lights
|
||||
# - switch.tasmo_ks811d_6110_kitchen_a # Main Kitchen, Main Lights
|
||||
# - switch.tasmo_ks811d_6110_kitchen_b # Main Kitchen, Bench Lights
|
||||
# - switch.tasmo_ks811s_2940_hallway_1a # Hallway Main Lights
|
||||
# - switch.tasmo_ks811d_1701_stairs_2a # Stairs, Lower ceiling lights
|
||||
# - switch.tasmo_ks811t_0702_lounge_3a # Lounge Main, South
|
||||
# - switch.tasmo_ks811t_0702_lounge_3b # Lounge Main, Middle
|
||||
# - switch.tasmo_ks811t_0702_lounge_3c # Lounge Main, North (above stairs)
|
||||
# - switch.tasmo_ks811t_0707_downstloun_2a # Foxhole Lounge Main Lights
|
||||
# - switch.tasmo_ks811t_0707_downstloun_2b # Foxhole Lounge Wall Lights
|
||||
# - switch.tasmo_ks811s_3136_downstbed2_1a # Foxhole Craft Room Lights
|
||||
# - switch.tasmo_ks811t_3642_downstbed1_1a # Foxhole Main Bedroom, Main Lights
|
||||
# - switch.tasmo_ks811t_2192_downstkitch_1a # Foxhole Kitchen Entry Lights
|
||||
# - switch.tasmo_ks811t_2192_downstkitch_1b # Foxhole Kitchen Main Lights
|
||||
# - switch.tasmo_ks811t_1181_downstbath_a # Foxhole Downstairs Bathroom Main Lights
|
||||
# - switch.tasmo_s4chan_4231_underhouselights_b # Underhouse Main Lights
|
||||
|
||||
switch:
|
||||
- platform: group
|
||||
name: Simulation Lights
|
||||
# Lights included in 'away from home' random patternsentities:
|
||||
entities:
|
||||
- switch.tasmo_ks811d_1242_entrance_a # Entranceway Main Lights
|
||||
- switch.tasmo_ks811d_0302_entrybath_a # Entranceway Guest Bathroom Lights
|
||||
- switch.tasmo_ks811d_6110_kitchen_a # Main Kitchen, Main Lights
|
||||
- switch.tasmo_ks811d_6110_kitchen_b # Main Kitchen, Bench Lights
|
||||
- switch.main_hallway_lightswitch_tasmo_ks811s_2940_hallway_1a # Hallway Main Lights
|
||||
- switch.tasmo_ks811d_1701_stairs_2a # Stairs, Lower ceiling lights
|
||||
- switch.tasmo_ks811t_0702_lounge_3a # Lounge Main, South
|
||||
- switch.tasmo_ks811t_0702_lounge_3b # Lounge Main, Middle
|
||||
- switch.tasmo_ks811t_0702_lounge_3c # Lounge Main, North (above stairs)
|
||||
- switch.tasmo_ks811t_0707_downstloun_2a # Foxhole Lounge Main Lights
|
||||
- switch.tasmo_ks811t_0707_downstloun_2b # Foxhole Lounge Wall Lights
|
||||
- switch.tasmo_ks811s_3136_downstbed2_1a # Foxhole Craft Room Lights
|
||||
- switch.tasmo_ks811t_3642_downstbed1_1a # Foxhole Main Bedroom, Main Lights
|
||||
- switch.tasmo_ks811t_2192_downstkitch_1a # Foxhole Kitchen Entry Lights
|
||||
- switch.tasmo_ks811t_2192_downstkitch_1b # Foxhole Kitchen Main Lights
|
||||
- switch.tasmo_ks811t_1181_downstbath_a # Foxhole Downstairs Bathroom Main Lights
|
||||
- switch.tasmo_s4chan_4231_underhouselights_b # Underhouse Main Lights
|
@@ -1 +0,0 @@
|
||||
|
Reference in New Issue
Block a user