# Copyright (c) 2022 Ilia Sotnikov
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

"""
Sensor definitions for G90 alarm panel.
"""
from __future__ import annotations
import logging
from .base import (
    G90PeripheralDefinition,
    G90PeripheralDefinitionsBase,
    G90PeripheralTypes,
    G90PeripheralProtocols,
    G90PeripheralRwModes,
    G90PeripheralMatchModes,
    unique_definitions
)

_LOGGER = logging.getLogger(__name__)


@unique_definitions
class G90SensorDefinitions(G90PeripheralDefinitionsBase):
    """
    Sensor definitions for G90 devices, required when modifying them since
    writing a sensor to the device requires values not present on read.
    """
    SENSOR_DEFINITIONS = [
        G90PeripheralDefinition(
            type=G90PeripheralTypes.CORD_SENSOR,
            subtype=1,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Door Sensor: Wired",
            protocol=G90PeripheralProtocols.CORD,
            timeout=0,
            baudrate=1480,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.CORD_SENSOR,
            subtype=2,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Glass Break Sensor: Wired",
            protocol=G90PeripheralProtocols.CORD,
            timeout=0,
            baudrate=1480,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.CORD_SENSOR,
            subtype=3,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Gas Sensor: Wired",
            protocol=G90PeripheralProtocols.CORD,
            timeout=0,
            baudrate=1480,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.CORD_SENSOR,
            subtype=4,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Smoke Sensor: Wired",
            protocol=G90PeripheralProtocols.CORD,
            timeout=0,
            baudrate=1480,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.CORD_SENSOR,
            subtype=5,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="SOS Button: Wired",
            protocol=G90PeripheralProtocols.CORD,
            timeout=0,
            baudrate=1480,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.CORD_SENSOR,
            subtype=6,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Vibration Sensor: Wired",
            protocol=G90PeripheralProtocols.CORD,
            timeout=0,
            baudrate=1480,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.CORD_SENSOR,
            subtype=7,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Water Leak Sensor: Wired",
            protocol=G90PeripheralProtocols.CORD,
            timeout=0,
            baudrate=1480,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.CORD_SENSOR,
            subtype=9,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Beam Sensor: Wired",
            protocol=G90PeripheralProtocols.CORD,
            timeout=0,
            baudrate=1480,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.CORD_SENSOR,
            subtype=8,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="PIR Motion Sensor: Wired",
            protocol=G90PeripheralProtocols.CORD,
            timeout=0,
            baudrate=1480,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.CORD_SENSOR,
            subtype=11,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="RFID: Wired",
            protocol=G90PeripheralProtocols.CORD,
            timeout=0,
            baudrate=1480,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.CORD_SENSOR,
            subtype=12,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Door Bell: Wired",
            protocol=G90PeripheralProtocols.CORD,
            timeout=0,
            baudrate=1480,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.IR_2_4G,
            subtype=0,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.WRITE,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Infrared Transcoder",
            protocol=G90PeripheralProtocols.RF_PRIVATE,
            timeout=0,
            baudrate=800,
            node_count=1
        ),

        G90PeripheralDefinition(
            type=G90PeripheralTypes.TOUCH_SWITCH_2_4G,
            subtype=1,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.WRITE,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Switch: 2.4G Type 1",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=960,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.TOUCH_SWITCH_2_4G,
            subtype=2,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.WRITE,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Switch: 2.4G Type 2",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=960,
            node_count=2
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.TOUCH_SWITCH_2_4G,
            subtype=3,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.WRITE,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Switch: 2.4G Type 3",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=960,
            node_count=3
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.TOUCH_SWITCH_2_4G,
            subtype=4,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.WRITE,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Switch: 2.4G Type 4",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=960,
            node_count=4
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.DOOR,
            subtype=0,
            rx=5,
            tx=0,
            private_data='F100f5017d02f803f90400',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY16BITS,
            name="Door Sensor: WDS07",
            protocol=G90PeripheralProtocols.RF_2262,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.DOOR,
            subtype=1,
            rx=2,
            tx=0,
            private_data='0001020400',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Door Sensor: Non-smart",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.DOOR,
            subtype=3,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="Door Sensor: WRDS01",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.DOOR,
            subtype=2,
            rx=5,
            tx=0,
            private_data='F100f5017d02f803f904',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY16BITS,
            name="Door Sensor: Smart",
            protocol=G90PeripheralProtocols.RF_2262,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.GLASS,
            subtype=0,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="Glass Break Sensor: BLPS",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.GAS,
            subtype=0,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="Gas Sensor: WGD01",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.SMOKE,
            subtype=0,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="Smoke Sensor: WSD02",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.SMOKE,
            subtype=1,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="Smoke Sensor: WSD04",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.SOS,
            subtype=1,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="SOS Button: WEB01",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.SOS,
            subtype=0,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="SOS Button: WEB03",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.VIB,
            subtype=0,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="Vibration Sensor: WSS01",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.WATER,
            subtype=1,
            rx=0,
            tx=0,
            private_data='',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="Water Leak Sensor: LSTC02",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.WATER,
            subtype=0,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="Water Leak Sensor: LSTC01",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.INFRARED,
            subtype=3,
            rx=3,
            tx=0,
            private_data='06000301020200',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="PIR Motion Sensor: WMS08",
            protocol=G90PeripheralProtocols.RF_2262,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.INFRARED,
            subtype=12,
            rx=3,
            tx=0,
            private_data='060003010202000314',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="PIR Motion Sensor: WMS08B",
            protocol=G90PeripheralProtocols.RF_2262,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.INFRARED,
            subtype=0,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="PIR Motion Sensor: ODPIR",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.INFRARED,
            subtype=5,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="PIR Motion Sensor: N650",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.INFRARED,
            subtype=6,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="PIR Motion Sensor: WPD02",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.INFRARED,
            subtype=8,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="PIR Motion Sensor: WCMS02",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.INFRARED,
            subtype=9,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="PIR Motion Sensor: CWMS01",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.INFRARED,
            subtype=11,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="PIR Motion Sensor: WMS04",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.INFRARED,
            subtype=2,
            rx=3,
            tx=0,
            private_data='04000801020200',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="PIR Motion Sensor: WMS07",
            protocol=G90PeripheralProtocols.RF_2262,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.INFRARED,
            subtype=4,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="PIR Motion Sensor: ODPIR03",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.INFRARED,
            subtype=7,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="PIR Motion Sensor: WPD01",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.INFRARED,
            subtype=1,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="PIR Motion Sensor: Ceiling",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.IN_BEAM,
            subtype=0,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="Beam Sensor: ABT",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.IN_BEAM,
            subtype=1,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="Beam Sensor: ABE",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.IN_BEAM,
            subtype=2,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="Beam Sensor: ABH",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.REMOTE,
            subtype=1,
            rx=4,
            tx=0,
            private_data='0d000b010e02070300',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Remote: RMC08",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.REMOTE,
            subtype=0,
            rx=4,
            tx=0,
            private_data='cf00fc01f3023f0300',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY16BITS,
            name="Remote: RMC07",
            protocol=G90PeripheralProtocols.RF_2262,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.REMOTE,
            subtype=4,
            rx=4,
            tx=0,
            private_data='cf00fc01f3023f0300',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY16BITS,
            name="Remote: RMC02",
            protocol=G90PeripheralProtocols.RF_2262,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.REMOTE,
            subtype=2,
            rx=3,
            tx=0,
            private_data='07000602050300',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Remote: 3 Button",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.RFID,
            subtype=1,
            rx=11,
            tx=0,
            private_data='0e0007010d020b03010402050c060a0709080809060a00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="RFID: K07",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.DOORBELL,
            subtype=1,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="Door Bell: WDB",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.BUTTONID,
            subtype=1,
            rx=4,
            tx=0,
            private_data='07000e010d020b0300',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Fingerprint: Sensor",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.WATCH,
            subtype=0,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY16BITS,
            name="SOS Button: Watch",
            protocol=G90PeripheralProtocols.RF_2262,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.FINGER_LOCK,
            subtype=1,
            rx=0,
            tx=2,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY16BITS,
            name="Fingerprint: Lock",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=1480,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.SUBHOST,
            subtype=0,
            rx=0,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ALL,
            name="Sub Host: SS08S",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=1480,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.GAS_VALVE,
            subtype=0,
            rx=2,
            tx=1,
            private_data='09000801ff0e0e',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Gas Valve Sensor: WGD02",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=1600,
            node_count=1
        ),
        G90PeripheralDefinition(
            type=G90PeripheralTypes.REMOTE_2_4G,
            subtype=4,
            rx=4,
            tx=0,
            private_data='00',
            rw_mode=G90PeripheralRwModes.READ,
            match_mode=G90PeripheralMatchModes.ONLY20BITS,
            name="Remote: RMC2.4G",
            protocol=G90PeripheralProtocols.RF_1527,
            timeout=0,
            baudrate=0,
            node_count=1
        ),
    ]

    @classmethod
    def definitions(cls) -> list[G90PeripheralDefinition]:
        """
        Gets all sensor definitions.

        :return: List of sensor definitions.
        """
        _LOGGER.debug(
            "Number of sensor definitions: %d", len(cls.SENSOR_DEFINITIONS)
        )
        return cls.SENSOR_DEFINITIONS
