pihome-shc / pihome

PiHome - Smart Heating, Ventilation and Air Conditioning (HVAC)
http://www.pihome.eu
Other
52 stars 25 forks source link

Clicking on temperature circle deletes the schedule #425

Closed sandreialexandru closed 3 years ago

sandreialexandru commented 3 years ago

Clicking on temperature circle in the zone modal deletes the schedule instead of disabling it.

pihome-shc commented 3 years ago

@sandreialexandru temperature circle have href="javascript:active_schedule();" can you check if you have same href or different?

sandreialexandru commented 3 years ago

16045372056805937282219734353450 This is how I have it. If I change it like you say it does not do anything.

pihome-shc commented 3 years ago

is that schedulelist.php ? can you check if you have latest version

sandreialexandru commented 3 years ago

It is homelist.php The schedule under the modal popup window (near OneTouch) gets deleted when clicking on temperature circle. In schedulelist.php work OK.

pihome-shc commented 3 years ago

if you have only one zone enabled in any schedule and you disable that zone from dashboard then schedulelist do not display that but it stays in db. it is bug in schedulelist.php

pihome-shc commented 3 years ago

line 57 need to change from

SELECT time_id, time_status, `start`, `end`, WeekDays,tz_id, tz_status, zone_id, index_id, zone_name, `category`, temperature, FORMAT(max(temperature),2) as max_c, sch_name, max(sunset) AS sunset FROM schedule_daily_time_zone_view WHERE holidays_id = 0 AND tz_status = 1 group by time_id ORDER BY start, sch_name asc

to

SELECT time_id, time_status, `start`, `end`, WeekDays,tz_id, tz_status, zone_id, index_id, zone_name, `category`, temperature, FORMAT(max(temperature),2) as max_c, sch_name, max(sunset) AS sunset FROM schedule_daily_time_zone_view WHERE holidays_id = 0 group by time_id ORDER BY start, sch_name asc
pihome-shc commented 3 years ago

fixed this issue, can you test this and if it works lets close this issue

sandreialexandru commented 3 years ago

It is working...in some way. After clicking the circle the schedule still remains active in ../schedule.php, but with no zone selected

pihome-shc commented 3 years ago

yes schedule time still stay active but zone become in-active hence you see schedule time active.

sandreialexandru commented 3 years ago

Good enough solution for now, thank you! Do you agree that this issue can be closed? Please make a commit to the GITHUB code.

pihome-shc commented 3 years ago

yes, you can close this issue github is updated