Dehumidifier Automation

I am using my dehumidifier with a Sonoff SNZB-02D along with a smart plug to switch the unit on & off at two set points.
My automation seems to work ok but I would like to add a period of time between which the dehumidifier does not switch on regardless of the humidity.

My preference would be: Dehumidifier switches on at 53.4% & switches off at 49.1% & then doesn’t run between the hours of 2100 & 0700.

I have searched & found similar threads but as I am fairly new to Home Assistant & my knowledge is lacking I have not had any luck in getting them working.

Below are the automations that are working for me at the moment without the off time, I would be grateful if anybody could offer any advice.

alias: Turn On @ Set Point
description: ""
trigger:
  - type: humidity
    platform: device
    device_id: e63ff7365862a7110ee79911c4ca0c64
    entity_id: 90423d50cd01a563ead4aa3897979b9d
    domain: sensor
    above: 53.4
condition: []
action:
  - type: turn_on
    device_id: 5bfc5cacb9fa083f5d6c8f0658e7cb1b
    entity_id: c67a9ec759e6516105ca23afc229c5c1
    domain: switch
mode: single
alias: Turn Off @ Set Point
description: ""
trigger:
  - type: humidity
    platform: device
    device_id: e63ff7365862a7110ee79911c4ca0c64
    entity_id: 90423d50cd01a563ead4aa3897979b9d
    domain: sensor
    below: 49.1
condition: []
action:
  - type: turn_off
    device_id: 5bfc5cacb9fa083f5d6c8f0658e7cb1b
    entity_id: c67a9ec759e6516105ca23afc229c5c1
    domain: switch
mode: single

Please formatted your code blocks properly as outlined in Questions Guideline #11

You have a couple options…

Option 1: Modify the current automations to include time conditions and triggers.

Option 2: Combine your sensor and switch using the Generic hygrostat integration. Then your automation just needs to turn it on/off at the desired times.