Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tomorrow #25

Open
hokeson opened this issue Dec 11, 2024 · 0 comments
Open

tomorrow #25

hokeson opened this issue Dec 11, 2024 · 0 comments

Comments

@hokeson
Copy link

hokeson commented Dec 11, 2024

I am not an expert but I wanted to see what is the VT and NT tomorrow.
I added following part of code in custom_components/predistribude/binary_sensor.py instead of rows 164-167

self.tree = html.fromstring(page.content)
self.html = etree.tostring(self.tree.xpath('//div[@id="component-hdo-dnes"]/div[@class="hdo-bar"]')[0]).decode("utf-8").replace('\n', '').replace('\t', '').replace('"/>', '"></span>')
self.html = self.html.replace('<div class="overflow-bar"></span>', '<div class="overflow-bar"></div>')
a = self.html
self.html = etree.tostring(self.tree.xpath('//div[@id="component-hdo-zitra"]')[0]).decode("utf-8").replace('\n', '').replace('\t', '').replace('"/>', '"></span>')
self.html = self.html.replace('<div class="overflow-bar"></span>', '<div class="overflow-bar"></div>')
self.html = a + self.html

I need to change that after each update. if you find it interesting it could be added for all. thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant