Node-Red - Please Help

Hi there

I’m trying to create an automation which reads the following information.

        <div class="mt-4 mb-3">
          <a href="https://www.nelincs.gov.uk/refuse-collection-schedule/?uprn=11040296&view=timeline" class="px-3 mb-1 btn btn-dark border-0 text-white acc-link-no-underline">
            <i class="far fa-stream mr-2"></i>
            View Collection Timeline
          </a>
          <a href="https://www.nelincs.gov.uk/refuse-collection-schedule/?uprn=11040296&view=type" class="px-3 mb-1 btn btn-dark border-0 text-white acc-link-no-underline">            <i class="far fa-th-large mr-2"></i>
            View Collections by Bin Type
          </a>
        </div>


          <div class="row">

            <div class="col">
              <div class="card mt-2 border">
                <ul class="list-group list-group-flush">
                                        <li class="list-group-item p-0 p-3 bin-collection-item ">
                        <div class="float-left mr-3 text-center rounded" style="height: 60px; width: 60px; padding-top: 16px; background-color: #1C8224;">
                          <div class="h4">
                            <i class="far fa-trash-alt text-white"></i>
                          </div>
                        </div>
                        <div class="">
                          <h3 class="h5 m-0 p-0">
                            Friday, 17<sup>th</sup> June 2022                          </h3>
                          <div class="">
                            Household Waste                          </div>
                        </div>
                      </li>
                                            <li class="list-group-item p-0 p-3 bin-collection-item ">
                        <div class="float-left mr-3 text-center rounded" style="height: 60px; width: 60px; padding-top: 16px; background-color: #82581C;">
                          <div class="h4">
                            <i class="far fa-trees text-white"></i>
                          </div>
                        </div>
                        <div class="">
                          <h3 class="h5 m-0 p-0">
                            Monday, 20<sup>th</sup> June 2022                          </h3>
                          <div class="">
                            Garden Waste                          </div>
                        </div>
                      </li>
                                            <li class="list-group-item p-0 p-3 bin-collection-item ">
                        <div class="float-left mr-3 text-center rounded" style="height: 60px; width: 60px; padding-top: 16px; background-color: #1C5682;">

Assuming you retrieve the page with an http request node, you can then pass it to an html node. This should be configured with a selector of h3 and output “only the text contents of the elements” to collapse the <sup> elements. You will have to do a bit of string processing too, as you’ll probably get whitespaces you don’t want. But the upshot is the output of the html node will be an array containing the text of each of the h3 elements.

Thank you for the reply, someone has helped me create an flow to extract the data.

Just unsure how to use the data

Thanks

The way you send the announcement to the echo could be used to send that same message to a entity node. This will create a sensor in HA. You will need the nodered companion in HACS

Hi have nodered companion in HACS

Can someone please help / advise me the way forward as i seems to be stuggling to work out the next steps

I would like to extract the date for each bin from the data collected and create a entity named as the bin type and that will display the list of dates into a lovelace card.

Then i’ve like to be able to create some kind of automation which will allow me to create an notification to my echo dot on the morning of any of the dates telling me which bin is due.

Thank you to anyone who takes the time to read this.

Sorry I took the old post as you had a way to trigger an automation. This is not a straight forward operation as you have already figured out.

The best I can offer you is that you’d need to hard code 3 input selects with the dates in the format 2019-04-20 and an input_datetime for each bin.

This flow will fire once on the day of, then advance the input_select and load the next date into the input_datetime

[{"id":"3b9444ad9c2677b3","type":"ha-time","z":"f80b6c338afd5483","name":"input date time ","server":"","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityId":"","property":"","offset":"0","offsetType":"num","offsetUnits":"minutes","randomOffset":false,"repeatDaily":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"sunday":true,"monday":true,"tuesday":true,"wednesday":true,"thursday":true,"friday":true,"saturday":true,"debugenabled":false,"x":340,"y":880,"wires":[["d31826e4c165aea7","6473d40163e0261b","5e724cc21575d799"]]},{"id":"d31826e4c165aea7","type":"debug","z":"f80b6c338afd5483","name":"action","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":610,"y":880,"wires":[]},{"id":"6473d40163e0261b","type":"api-call-service","z":"f80b6c338afd5483","name":"advance input select date","server":"","version":5,"debugenabled":false,"domain":"input_select","service":"select_next","areaId":[],"deviceId":[],"entityId":["input_select.date"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":670,"y":940,"wires":[[]]},{"id":"5e724cc21575d799","type":"delay","z":"f80b6c338afd5483","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":560,"y":1000,"wires":[["52ce64f3500c6718"]]},{"id":"52ce64f3500c6718","type":"api-current-state","z":"f80b6c338afd5483","name":"get input select date","server":"","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_select.date","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":760,"y":1000,"wires":[["d5add75ef8ec83df"]]},{"id":"d5add75ef8ec83df","type":"api-call-service","z":"f80b6c338afd5483","name":"","server":"","version":5,"debugenabled":false,"domain":"input_datetime","service":"set_datetime","areaId":[],"deviceId":[],"entityId":[],"data":"{\"date\":\"{{payload}}\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1040,"y":1000,"wires":[[]]}]

Thank you for that,

You say i need to hard code 3 inputs? Are these sensors ?

Thanks

Hard coded means you will need to manually enter the dates and convert them to YYYY-MM-DD. In HA goto settings -->integrations -->helpers tab -->create —>dropdown