Monitoring Home NAS availability by HTML Scrape

Hello All,

Im trying to monitor my home NAS server which is publicly avaible but hided behind he cloudflare tunnel.
Obviously simple ping will not gona work so I tried to monitor based on recived HTML which is different when NAS is online (when offline, cloudflare sending the error page)

I tried both: native Home Assistant Scrape integration and HACS Multiscrape: nothing worked.
I do not know what Im doing wrong. I tried many different URL, selectors and value_template
HTML is simple:
image

Here is one of many examples which I tried (using multiscrape):

- name: HA scraper
  resource: https://files.amadeuszjakobczak.pl/login?redirect=%2Ffiles%2F
  scan_interval: 10
  sensor:
    - unique_id: NAS-TEST6
      name: NAS-TEST6
      select: "#login"
      value_template: '{{ "available" if value else "unavailable" }}'
    - unique_id: NAS-TEST5
      name: NAS-TEST5
      select: "#login"
      value_template: '{{ value }}'

I tried:
resource:
https://files.amadeuszjakobczak.pl
http://files.amadeuszjakobczak.pl
https://files.amadeuszjakobczak.pl/

select: “h1”, “#login”, “form#login”, “.login > h1:nth-child(1)”

I see sensor in Development Tool but no matter what I do I have always “unavailable” state.
What Im doing wrong ? When I simply copy-paste example sensor from multiscrap documentation, it works perfectly.

I will appreciate for any hints or advices

I think I found the problem. unique_id cannot have a “-” but only “_”
When I changed that, everything is working well.

If it will help someone, this is my working configuration:

- name: NAS_Status
  resource: http://files.amadeuszjakobczak.pl
  scan_interval: 10
  sensor:
    - unique_id: AJ_NAS_Online_Check
      name: AJ NAS Online Check
      select: "title"
      value_template: '{{ "available" if value == "File Browser" else "unavailable" }}'