diff --git a/blueprints/display_sensor_state_on_hikvision_video.yaml b/blueprints/display_sensor_state_on_hikvision_video.yaml new file mode 100644 index 0000000..d6e02db --- /dev/null +++ b/blueprints/display_sensor_state_on_hikvision_video.yaml @@ -0,0 +1,81 @@ +blueprint: + name: Display Sensor State On Hikvision Video + description: | + Sets an overlay text on a Hikvision camera video. + domain: automation + input: + config_entry_id: + name: "Device" + description: "The Hikvision device." + selector: + config_entry: + integration: hikvision_next + camera_no: + name: "Camera" + description: "The camera number." + default: 1 + selector: + number: + min: 1 + max: 32 + step: 1 + mode: box + sensor_entity: + name: Sensor + description: "The sensor entity to display on the video." + selector: + entity: + domain: sensor + position_x: + name: "X" + description: "The X position of the overlay text." + default: 16 + selector: + number: + min: 0 + max: 1920 + step: 1 + position_y: + name: "Y" + description: "The Y position of the overlay text." + default: 570 + selector: + number: + min: 0 + max: 1080 + step: 1 + enabled: + name: "State" + description: "Enable or disable the overlay text." + default: true + selector: + boolean: {} +mode: single +variables: + entity_id: !input sensor_entity + camera_no: !input camera_no + position_x: !input position_x + position_y: !input position_y + enabled: !input enabled +trigger: + - platform: time_pattern + minutes: /15 +action: + - service: hikvision_next.isapi_request + data: + method: PUT + config_entry_id: !input config_entry_id + path: "/System/Video/inputs/channels/{{camera_no}}/overlays/text" + payload: > + + + + 1 + {{ enabled | lower }} + {{ position_x }} + {{ position_y }} + {{ states(entity_id, with_unit=True) }} + + + + response_variable: response