# Loads default set of integrations. Do not remove. default_config: # Load frontend themes from the themes folder frontend: themes: !include_dir_merge_named themes automation: !include automations.yaml script: !include scripts.yaml scene: !include scenes.yaml # Example configuration.yaml entry mqtt: - switch: unique_id: uid_switch2 name: "NetControl_A_CH2" # next topics must match your NetControl's settings for 'User defined sub-topic' and desired channel state_topic: "NetControl/subgroup/out/ch2" command_topic: "NetControl/subgroup/in/ch2" payload_on: "ON" payload_off: "OFF" state_on: "ON" state_off: "OFF" retain: true value_template: "{{value_json.value.real}}" - switch: unique_id: uid_switch3 name: "NetControl_A_CH3" # next topics must match your NetControl's settings for 'User defined sub-topic' and desired channel state_topic: "NetControl/subgroup/out/ch3" command_topic: "NetControl/subgroup/in/ch3" payload_on: "ON" payload_off: "OFF" state_on: "ON" state_off: "OFF" retain: true value_template: "{{value_json.value.real}}" - sensor: unique_id: id_sensor_hum1 name: "NetControl_Hummidity" # topic must match your NetControl's settings for 'User defined sub-topic' and desired channel state_topic: "NetControl/subgroup/out/ch25" unit_of_measurement: "%" # NetControl sends dimension with value, but HomeAssistant doesn't like it - so trim it! value_template: '{{value_json.value.real|trim("%")}}' - binary_sensor: unique_id: uid_alarm1 name: "NetControl_Door1" state_topic: "NetControl/subgroup/out/ch26" payload_on: "OPEN" payload_off: "CLOSED" device_class: door value_template: "{{value_json.value.real}}" - sensor: name: "pulse_counter_1" state_topic: "NetControl/subgroup/out/ch20" value_template: "{{value_json.value.raw}}" force_update: true switch: - platform: snmp scan_interval: 10 # state polling interval in seconds name: "Netcontrol_SNMP_Line4" # Name of this NetControl channel in Home Assistant host: 192.168.1.100 # IP address of your NetControl Device version: "1" auth_protocol: none priv_protocol: none payload_on: 1 payload_off: 0 vartype: Integer # Enter here your R/W community string community: private # Enter here your R/W community string # Line 1 uses [P]=9. Change to another value, according to model (see manual) baseoid: 1.3.6.1.4.1.19865.2.3.1.9.6.0 # Line 1 uses [P]=9. Change to another value, according to model (see manual) sensor: - platform: snmp scan_interval: 10 # Polling interval in secods (system default is 3min) name: "Netcontrol_Temperature_TDS300" host: 192.168.1.100 version: "1" auth_protocol: none priv_protocol: none community: private baseoid: 1.3.6.1.4.1.19865.2.3.1.25.6.0 unit_of_measurement: "C" # Template to convert raw SNMP value to temparature value_template: "{{(((3300 * (value | float) / 1023) - 500) / 10) | round(1)}}" - platform: statistics entity_id: sensor.pulse_counter_1 name: pulse_stat_change state_characteristic: change sampling_size: 2 max_age: minutes: 5 # to set zero power value if MQTT data is not received by some reason template: - sensor: - name: "Current load" # Change 1600 with your device's imp/kWh constant state: "{{ (states('sensor.pulse_stat_change') | float * 1000 * 3600 / 1600) | round(1) }}" unit_of_measurement: "W"