Giter Site home page Giter Site logo

Comments (30)

bramstroker avatar bramstroker commented on August 17, 2024 1

@EddyK69 Ok, I only implemented in YAML yet. Will have a look if I can also implement for the GUI.

from homeassistant-powercalc.

bramstroker avatar bramstroker commented on August 17, 2024 1

Added for GUI with #2176

from homeassistant-powercalc.

bramstroker avatar bramstroker commented on August 17, 2024 1

That's strange it shouldn't try to download the release as it's not actually as release.
Might be a bug in HACS. Pretty sure I was able to install this way in the past.
Don't have time to investigate that further atm. Will do a new release for Powercalc soon.

from homeassistant-powercalc.

bramstroker avatar bramstroker commented on August 17, 2024 1

@EddyK69 I see, there was actually a problem with the translation keys, causing the labels not correctly rendered.
Will be fixed in next version.

The correct field is this one:

Screenshot 2024-04-19 at 08 16 05

from homeassistant-powercalc.

bramstroker avatar bramstroker commented on August 17, 2024 1

Have good news, because it was a quicky. Should be fixed with #2210

from homeassistant-powercalc.

bramstroker avatar bramstroker commented on August 17, 2024 1

Have good news, because it was a quicky. Should be fixed with #2210

Quick indeed! Wil try it again soon, thnx!

Will be in next release. not sure when yet. maybe this weekend

from homeassistant-powercalc.

bramstroker avatar bramstroker commented on August 17, 2024 1

Should be fixed with #2229. According to the unit tests this should fix the issue.
I'll also do some testing on my develop HA instance.

from homeassistant-powercalc.

bramstroker avatar bramstroker commented on August 17, 2024 1

It's working for me now:

Overview.Home.Assistant.mp4

You can try by editing config/custom_components/powercalc/strategy/playbook.py and add following to line 95:

Restart HA afterwards.

from homeassistant-powercalc.

bramstroker avatar bramstroker commented on August 17, 2024

I will consider this.
Do you use YAML or GUI?

from homeassistant-powercalc.

bramstroker avatar bramstroker commented on August 17, 2024

Implemented with #2170

See:
https://homeassistant-powercalc.readthedocs.io/en/latest/strategies/playbook.html#active-playbook-based-on-state-trigger

I cannot do for OFF state as this is a special case in Powercalc, and needs fundamental changes on different places.

Will be in next release.

You could test it by installing the master branch with HACS.

from homeassistant-powercalc.

EddyK69 avatar EddyK69 commented on August 17, 2024

Thnx! That was a quick one! Is use the GUI btw. Will test this asap

from homeassistant-powercalc.

EddyK69 avatar EddyK69 commented on August 17, 2024

Thnx, but cannot download Master via HACS: get a 404 on
https://github.com/bramstroker/homeassistant-powercalc/releases/download/master/powercalc.zip

from homeassistant-powercalc.

erkr avatar erkr commented on August 17, 2024

Hi @bramstroker
I tried to download master many times, and it always failed with 404. I think the access right for that folder are restricted to your account. Maybe you can make the path to https://github.com/bramstroker/homeassistant-powercalc/releases/download/master/powercalc.zip public readable?!

from homeassistant-powercalc.

bramstroker avatar bramstroker commented on August 17, 2024

@erkr Strange you both are having issues. I cannot make that path available as master is not a release, but just the main branch where releases are made from.
A zip file is only build when a new release / version is being issued.
HACS shouldn't try to download powercalc.zip, but rather clone the repository.
Maybe something changed in HACS why this is not working anymore, it was working in the past.
I'll have a look.

from homeassistant-powercalc.

bramstroker avatar bramstroker commented on August 17, 2024

I have found following issue on HACS issue tracker:
hacs/integration#3513

It was working in the past, but apparently it does not work anymore when the integration uses zip releases, which is what powercalc does and is the preferred way.
According to the developer of HACS it's not something which will be fixed in HACS, which is a pitty.
So there it not much I can do unfortunately.

If you want to you could download manually. And replace config/custom_components/powercalc with the contents of custom_components/powercalc. It's a littlebit more work, but it's essentially the same as HACS automates.

Screenshot 2024-04-06 at 19 29 17

from homeassistant-powercalc.

erkr avatar erkr commented on August 17, 2024

@bramstroker
Great you found out that it simply doesn't work. I propose to just remove the master from the release list. You currently release so actively, that I can wait for the next one ☺️

I recall from another project that a version must be set in the manifest when you copy the files manually

from homeassistant-powercalc.

bramstroker avatar bramstroker commented on August 17, 2024

@bramstroker Great you found out that it simply doesn't work. I propose to just remove the master from the release list. You currently release so actively, that I can wait for the next one ☺️

That not something I can fix in Powercalc, that's also a HACS issue.
When zip_release is used they should just hide the master branch from the list.
That's also suggested by other integration developers in the issue link I shared.
hacs/integration#3513 (comment)

I recall from another project that a version must be set in the manifest when you copy the files manually

I'm pretty confident that's not required. You can just overwrite the files manually and restart and it should load the new code.

from homeassistant-powercalc.

erkr avatar erkr commented on August 17, 2024

Today I'm with family, but I will give it a try tomorrow 👍

from homeassistant-powercalc.

EddyK69 avatar EddyK69 commented on August 17, 2024

Added for GUI with #2176

@bramstroker I cannot find the settings in the GUI I'm afraid. Where can I find it?

Scherm­afbeelding 2024-04-14 om 16 51 56 Scherm­afbeelding 2024-04-14 om 16 52 25

from homeassistant-powercalc.

EddyK69 avatar EddyK69 commented on August 17, 2024

@bramstroker Thnx. Found the hidden field 😄

But unfortunately i cannot get it working the way i thought it should:

I configured a device with a simple on/off state:
Scherm­afbeelding 2024-04-19 om 18 19 36

And added 2 playbooks in de config/powercalc/playbooks folder:

cat test-on.csv 
1,10
2,20
3,30
5,50
10,100
cat test-off.csv 
1,100
2,50
3,30
5,20
10,10

The 'On' playbook seems to work, but the 'Off' playbook doesn't. After switching the device to Off, power is set to 0 immediately and after switching it On again, the playbook doesn't seem to start from the
beginning:

Schermopname.2024-04-19.om.18.27.00.mov

I would expect that the playbook start over again after every state-change, right?

from homeassistant-powercalc.

bramstroker avatar bramstroker commented on August 17, 2024

@EddyK69 Did you see one of my first comments after I implemented?
#2160 (comment)

off state cannot be used for playbook.

I will have a quick look if I can find a way to implement without needing to modify too much.

from homeassistant-powercalc.

EddyK69 avatar EddyK69 commented on August 17, 2024

@EddyK69 Did you see one of my first comments after I implemented? #2160 (comment)

off state cannot be used for playbook.

Oops, missed that :|

from homeassistant-powercalc.

EddyK69 avatar EddyK69 commented on August 17, 2024

Have good news, because it was a quicky. Should be fixed with #2210

Quick indeed! Wil try it again soon, thnx!

from homeassistant-powercalc.

EddyK69 avatar EddyK69 commented on August 17, 2024

Still doesn't seem to work unfortunately :(

Schermopname.2024-05-03.om.00.00.35.mov

from homeassistant-powercalc.

bramstroker avatar bramstroker commented on August 17, 2024

@EddyK69 You are sure you are at v1.11.8 now?
Or are you running beta version of powercalc?

from homeassistant-powercalc.

EddyK69 avatar EddyK69 commented on August 17, 2024

@EddyK69 You are sure you are at v1.11.8 now? Or are you running beta version of powercalc?
@bramstroker Yep, I'm sure.

Scherm­afbeelding 2024-05-03 om 11 07 04

It worked once: switching ON started started to increase the power (see below how the playbooks are defined) and switiching OFF started to decrease, only once! After the OFF playbook was finished, i switched ON & OFF and nothing happens. I tried to restart the integration but that did not fix it.

Scherm­afbeelding 2024-05-03 om 11 05 56
cat test-on.csv 
1,10
2,20
3,30
5,50
10,100
cat test-off.csv 
1,100
2,50
3,30
5,20
10,10

from homeassistant-powercalc.

bramstroker avatar bramstroker commented on August 17, 2024

Ok thanks for the extra information. Will have a look if I can reproduce and fix.

from homeassistant-powercalc.

EddyK69 avatar EddyK69 commented on August 17, 2024

Ok thanks for the extra information. Will have a look if I can reproduce and fix.

Thnx! Just updated to V1.12.0 and it seems that is now not starting the OFF-playbook anymore :(

from homeassistant-powercalc.

EddyK69 avatar EddyK69 commented on August 17, 2024

Thanx @bramstroker for the quick fix! Wil try out this weekend

from homeassistant-powercalc.

EddyK69 avatar EddyK69 commented on August 17, 2024

Yep, works perfectly now! Thanx @bramstroker !

from homeassistant-powercalc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.