Comments (4)
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.
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.
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.
initial start/stop callbacks workin 2.4.4
from entity-controller.
Related Issues (20)
- Override entity prevents switching off HOT 7
- Ignore light state change
- Entity Controller not showing in Integrations HOT 1
- LUX and illuminance sensors HOT 1
- UL Length incompatible with release 2023.4 HOT 5
- Recorder Error converting ulid since 2023.4
- EC enhancement request
- stay_on: {state_entity} or blocking turning off the light on the state of the entity
- Add support for Brightness Sensor ( Value )
- Option: Invert sensor HOT 1
- Reload without HA restart HOT 2
- Entity Controller stuck in 'active' state HOT 2
- Feature: Conditions or enable/disable option HOT 1
- Controller entity always entering `blocked` state - why? HOT 3
- trigger_on_deactivate is triggered when giving up control because of an outside change. HOT 2
- EC sometimes enters blocked state HOT 6
- Warn users that timezones are mismatched
- Entities after potential configuration error are ignored
- example of "Custom State Strings" HOT 1
- Broken since Hass 2023.12 beta HOT 34
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from entity-controller.