Code Monkey home page Code Monkey logo

Comments (4)

danobot avatar danobot commented on May 20, 2024

You are right. The adjustment means it's ensures that the time period is in the future and end comes after start time.
This is really frustrating because I can't figure out the automated testing.
I had all set up for appdaemon but nothing for the component.

Will check this tomorrow. Meanwhile, please report back if the light goes into constrained mode at 21.00.

Do you have long lat, timezone and elevation configured under 'homeassitant'? I need to add this to the docs as its critical for timezone and sun component.

What is your timezone? I am +8:00.

from entity-controller.

danobot avatar danobot commented on May 20, 2024

Just posed a fix. v2.4.3
I just edited on my phone and did not test in HA. Logic wise it should be correct now.

from entity-controller.

jwelter1971 avatar jwelter1971 commented on May 20, 2024

Hi Danny,

I am in Washington DC area (EST = GMT-5). My lat/lng/elev/TZ are all set correctly (date time in the logs above looks correct).

I upgraded to 2.4.3 (note: version in the .py file is still 2.4.2 listed)

Below is the same log snipper and seems FIRST_END is as expected.

2019-01-15 11:48:15 INFO (MainThread) [custom_components.lightingsm] Config Item motion_master_bathroom: OrderedDict([('sensors', ['binary_sensor.master_bath_pir_sensor']), ('entities', ['light.master_vanity']), ('delay', 1800), ('sensor_type_duration', True), ('start_time', '07:00:00'), ('end_time', '21:00:00')])
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] Initialising LightingSM entity with this configuration: OrderedDict([('sensors', ['binary_sensor.master_bath_pir_sensor']), ('entities', ['light.master_vanity']), ('delay', 1800), ('sensor_type_duration', True), ('start_time', '07:00:00'), ('end_time', '21:00:00'), ('name', 'motion_master_bathroom')])
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] Entity name: motion_master_bathroom
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] Control Entities: ['light.master_vanity']
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] Added Control Entities as state entities: ['light.master_vanity']
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] Sensor Entities: ['binary_sensor.master_bath_pir_sensor']
2019-01-15 11:48:15 INFO (MainThread) [custom_components.lightingsm.motion_master_bathroom] serivce data set up: OrderedDict([('sensors', ['binary_sensor.master_bath_pir_sensor']), ('entities', ['light.master_vanity']), ('delay', 1800), ('sensor_type_duration', True), ('start_time', '07:00:00'), ('end_time', '21:00:00'), ('name', 'motion_master_bathroom')])
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] Result of parsing: {'datetime': datetime.datetime(2019, 1, 15, 7, 0, tzinfo=<DstTzInfo 'America/New_York' EST-1 day, 19:00:00 STD>), 'sun': None, 'offset': 0}
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] Result of parsing: {'datetime': datetime.datetime(2019, 1, 15, 21, 0, tzinfo=<DstTzInfo 'America/New_York' EST-1 day, 19:00:00 STD>), 'sun': None, 'offset': 0}
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] Parsed start time (unadjusted) 2019-01-15 07:00:00
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] Parsed end time (unadjusted) 2019-01-15 21:00:00
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] Setting FIRST START callback for 2019-01-16 07:00:00
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] Setting FIRST END callback for 2019-01-15 21:00:00
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] Result of parsing: {'datetime': datetime.datetime(2019, 1, 15, 7, 0, tzinfo=<DstTzInfo 'America/New_York' EST-1 day, 19:00:00 STD>), 'sun': None, 'offset': 0}
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] Result of parsing: {'datetime': datetime.datetime(2019, 1, 15, 21, 0, tzinfo=<DstTzInfo 'America/New_York' EST-1 day, 19:00:00 STD>), 'sun': None, 'offset': 0}
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] now_is_between start time 2019-01-15 07:00:00.107425-05:00
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] now_is_between end time 2019-01-15 21:00:00.107425-05:00
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] Config other
2019-01-15 11:48:15 DEBUG (MainThread) [custom_components.lightingsm.motion_master_bathroom] Using DAY MODE parameters: {'delay': 1800, 'service_data': None}

from entity-controller.

danobot avatar danobot commented on May 20, 2024

initial start/stop callbacks workin 2.4.4

from entity-controller.

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.